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
 Transact-SQL (2000)
 Connecting Multiple servers

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-11-05 : 08:33:10
Krishanka writes "Hii,
Can I access or connect multiple servers with a single SQL statement?.

For example I have server (computer) ABC & server (computer) XYZ. Can I connect two SQL tables two databases host by each of these servers into one SQL statement?
Regards"

jonasalbert20
Constraint Violating Yak Guru

300 Posts

Posted - 2004-11-05 : 11:13:43
I Think you can! Try this sample SQL...

SELECT * FROM SERVER1.tblOnServer1 as s1
LEFT JOIN SERVER2.tblOnServer2 as s2 on s1.ID = s2.IDnum

Does this answer your question?






Want Philippines to become 1st World COuntry? Go for World War 3...
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-11-05 : 11:28:04
lookup "sp_addlinkedserver" 1st.
Go to Top of Page
   

- Advertisement -