Groups | Blog | Home
all groups > sql server connect > august 2006 >

sql server connect : combining data on different sevvers


Arnie Rowland
8/10/2006 8:37:10 AM
Yes, quite possible. Subject to the security on both servers allowing =
such action.

Syntax is somewhat like this:

SELECT
a.Column1
, a.Column2
, b.Column5
, b.Column6
FROM Server1.MyDatabase.dbo.MyTable a
JOIN Server2.OtherDatabase.dbo.OtherTable b
ON a.KeyColumn =3D b.KeyColumn
WHERE ( a.CriteriaColumn =3D CriteriaA
AND b.CriteraColumn =3D CriteriaB
)


--=20
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.=20
Most experience comes from bad judgment.=20
- Anonymous


[quoted text, click to view]
Charles MacLean
8/10/2006 1:42:15 PM
I need to combine data from two different tables on two MS SQL servers
running on the same LAN into a single SELECT or VIEW. Is this possible and
what would the syntax look like?

Thanks,
Charles
MTS, Inc.

AddThis Social Bookmark Button