Thanks Phil. Yes this would work, however I won't be able to use this due to security restrictions with sql server 2005. I therefore have to come up with something else. More than likely I'll use the linked server feature. I do have another question - more or less a SQL question.
How can I create a JOIN that excludes records based on two columns? If I have one rowset that contains two columns that are keyed to another rowset of the same two columns, how can I get only those rows that are in the 2nd rowset that are not included in the 1st rowset? Thanks, Mike On 7/2/07, Phil Sayers <[EMAIL PROTECTED]> wrote:
i think you can specify the connection string to the remote server in the text of your query. Check sql books online for OPENDATASOURCE and OPENROWSET -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of Mike Andrews Sent: Monday, July 02, 2007 2:34 PM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: [ADVANCED-DOTNET] Cross-Server Queries Guys, Perhaps I'm being crazy here, but is it possible to execute a cross-sql server query without having to set up a linked server in sql server? My problem is that I want to execute a sql statement against two different databases located on two different servers but I don't really want a linked server (or I'd rather not if at all possible). Any suggestions? Thanks, Mike =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
=================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com