Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Multiple Database Query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-03-19 : 07:45:57
Alex writes "Is it possible to combine data from two separate databases, with separate adoConnections, in a single sql SELECT statement?"

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2003-03-19 : 07:54:46
create a linked server for serverB in ServerA.
Then
Select A.*, B.* from serverA.master.dbo.tablename as A, serverB.master.dbo.tablename as B where A.id = B.id

Sekar
~~~~
Success is not a destination that you ever reach. Success is the quality of your journey.
Go to Top of Page
   

- Advertisement -