Programmer's Corner Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programmer's Corner - Forums


Two Servers

 
Post new topic   Reply to topic    Programmer's Corner Forum Index -> Microsoft SQL Server
Author Message
WbHack
Bushi


Joined: 27 Jan 2005
Posts: 335
Location: Seattle

PostPosted: Wed Jul 19, 2006 4:47 pm    Post subject: Two Servers Reply with quote

I have two address tables, on different servers. the data tables are maintained separately - no location ID to key on (i'm probably going to use zip - it's the most specific) - need to match up locations and identify which are missing in the smaller table.

how do i join when the tables are on extra servers? i need all the data, not just the matches. SQL Server 2005.
Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Fri Jul 21, 2006 8:20 pm    Post subject: Reply with quote

sp_addlinkedserver

You have to link the two servers in order to do it. Then in your select statement your tables start with the server if you need to prefix

server.database.owner.table

The other option if it's a one time thing is to use DTS to export the data from the one server to the other.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Programmer's Corner Forum Index -> Microsoft SQL Server All times are GMT - 5 Hours
Page 1 of 1

 


Powered by phpBB © 2001, 2002 phpBB Group