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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join tables on different servers 1

Status
Not open for further replies.

jcfowl

Programmer
Feb 15, 2002
29
0
0
US
I know how to join tables in different databases, but I can't seem to join tables that are on different databases and also on different servers. Is there anyway to do this? If anyone knows the syntax please let me know. Thanks.
 
The "different" server(s) must be set up as Linked Servers. Then you can use a four part object name to reference the remote table:

Code:
SELECT * FROM Server.Database.Owner.Object

See also OPENDATASOURCE and OPENROWSET in BOL. Good luck!

--Angel [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top