|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 11:06 PM
Points: 41,
Visits: 109
|
|
hi,
In my work environment i have faced problem with getting data from two different sql servers like below
server A(ip:1.1.1.1) server B(1.1.1.2) Database A Database B Table A Table B
what i need to inner join table A and Table B..can any one suggest on this it would be greate help to me.
Thanks, Dastagiri
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Today @ 4:57 AM
Points: 510,
Visits: 2,236
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 4:08 AM
Points: 1,868,
Visits: 1,043
|
|
http://www.sqlservercentral.com/Forums/Topic938337-149-1.aspx
Malleswarareddy I.T.Analyst MCITP(70-451)
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 4:32 PM
Points: 2,063,
Visits: 3,787
|
|
This assumes you have successfully set up and are able to use a linked server: SELECT a.col1, b.col1 FROM LinkedServerA.DatabaseA.dbo.TableA INNER JOIN LinkedServerB.DatabaseB.dbo.TableB ON a.col1 = b.col1 WHERE a.somecondition = 'something that makes sense'
______________________________________________________________________________ "Never argue with an idiot; They'll drag you down to their level and beat you with experience"
|
|
|
|