July 9, 2010 at 10:39 am
I have 2 server is ‘server1 IP = 192.114.0.1’ and ‘server2 IP = 192.114.0.2’
I have a table 'TableS1' in 'ServerA' and a table 'TableS2' in 'ServerB'
I need to link 2 tables TableS1 and TablesS2 in a query.
Please help.
Regards,
may
July 9, 2010 at 10:53 am
did you create linked servers to them yet?
once the link exists, it's nothing more than referencing them with a 4 part name:
SELECT * FROM LinkedServerA.databasename.dbo.TableA myAlias1
LEFT OUTER JOIN
LinkedServerB.otherdatabase.dbo.TableB myAlias2
ON myAlias1.Id = myAlias2.ID
WHERE myAlias2.SOMETHING ='aValue'
Lowell
July 9, 2010 at 11:11 am
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply