This is a discussion on OpenQuery within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> I wish to send dynamic SQL to Openquery but it seems OpenQUERY only accepts string constants. Any advise on ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| If you need it to be dynamic, you can build the entire string that does the Openquery statement. Pass that string into an EXEC. You can find examples in the following article: HOW TO: Pass a Variable to a Linked Server Query http://support.microsoft.com/?id=314520 -Sue On Thu, 23 Jun 2005 21:34:04 -0700, Timothy Peer <TimothyPeer@discussions.microsoft.com> wrote: >I wish to send dynamic SQL to Openquery but it seems OpenQUERY only accepts >string constants. Any advise on how to do this. It would convenient if >Openquery could execute similar to dynamic SQL EXEC. > >Please advise. > >Regards, > >Tim Pee |