I want to join 2 tables from 2 different servers

I want to join 2 tables from 2 different servers.  I envisioned something like:

SELECT *
FROM Server1.Datebase.table t1 LEFT JOIN Server2.Database.table t2 ON t1.Index = t2.Index

Can this be done in t-sql?
jamesrbarnesAsked:
Who is Participating?
 
LowfatspreadCommented:
yes linked server
and 4 part naming

Servername.Datebasename.ownername.tablevieworfunctionName
0
 
Kevin HillSr. SQL Server DBACommented:
You need to set up the "other" server as a linked server.  Check out sp_addlinkedserver in Books Online, or look in the GUI for the version you are using...which is what...2000 or 2005?
0
 
poogy21Commented:
yes. setup a "linked server" and you could do exactly that.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.