I have 2 different servers, and I wish to join tables from 2 different
databases on 2 different servers. I looked into linked servers a little
bit. Is this the technology to use? I am connected via a VPN with both
servers. Any slick way to do a join like this?
DerekSlick? Is a normal ANSI join not good enough? :)
select <column list>
from <server1>.<db>.<schema/owner>.<table> <alias1>
<join qualifier> join <server2>.<db>.<schema/owner>.<table> <alias2>
on <alias1>.<common key> = <alias2>.<common key>
Is this what you need?
ML
http://milambda.blogspot.com/|||To execute distributed queries, you will need to use sp_addlinkedserver to
create a linked server. Refer to the BOL for more details.
Martin C K Poon
Senior Analyst Programmer
====================================
"Derek Hart" <derekmhart@.yahoo.com> bl
news:Oy%23cwPdeGHA.3348@.TK2MSFTNGP03.phx.gbl g...
> I have 2 different servers, and I wish to join tables from 2 different
> databases on 2 different servers. I looked into linked servers a little
> bit. Is this the technology to use? I am connected via a VPN with both
> servers. Any slick way to do a join like this?
> Derek
>
Showing posts with label differentdatabases. Show all posts
Showing posts with label differentdatabases. Show all posts
Subscribe to:
Posts (Atom)