Concatenating local variables into an execute...
Hello there,
I am having a major problem with the following script:
@command = SELECT .... + = [dbo].[t0209_addressTypes].[c0209_addressTypeID_pk]'
+ N' AND ' + @column1 + ' ' + N' LIKE ' + '"' + @value1 +'"'
When I run EXECUTE(@command) the server insists on interpreting @value1 as an object identifier and not a string literal.
What am I doing wrong?
Thank you,
Boris
|