I\'m trying to parameterise a search query that uses the LIKE keyword with a wildcard. The original sql has dynamic sql like this:
\"AND JOB_POSTCODE LIKE \'
Using:
"AND JOB_POSTCODE LIKE '" + isPostCode + "%' "
...means that the string is constructed before being tacked onto the dynamic SQL. This is so that you don't have to specify the parameter in the parameter list for sp_executesql/EXEC, while this:
"AND JOB_POSTCODE LIKE @postcode + '%' "
...does. Please post more of the query.