I'm trying to use a query defined by macro substitution with the sp_remotesql function. I tried:
DECLARE cursor_name CURSOR FOR
EXEC sp_remotesql local, @sSQL1, @sSQL2,...
However I always get the compile error:
Msg 156, Level 15, State 1:
Incorrect syntax near the keyword 'exec'.
How can I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.