I have an openquery statement with a parameter embeded as a variable:
select* from openquery(SomeServer,'
SELECT Description, Size
Group = ''XY'' AND
Code = '''+ @product + '''')
When I run it I get the following message:
Msg 102, Level 15, State 1, Line 8
Incorrect syntax near '+'.
When I hard code the "Code" value, like so:
Code = ''ABC''')
...it works fine.
I am at a loss and would appreciate any help on this.
Thanks in advanceSQL Servant