Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross-Server SQL Query 1

Status
Not open for further replies.

Dugy

Programmer
Dec 13, 2001
15
GB
Hi,

I have a requirement to run a query using data from 2 or more tables. These tables exist on 2 different SQL Servers.

Is it possible to JOIN these tables in a T-SQL Query?

Thanks

Dougie
 
Yes. Look up linked servers in BOL. Once you have one set up then you refer to it in the form:

Code:
SELECT * FROM myserver.mydb.owner.mytable

--James
 
Cheers James, much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top