data in table from 1 db to another-same server

  • I need to take DTS_companies (database DTS) and Update MAXSYR_companies (database MAXSYR) where records in DTS)companies are not in MAXSYR_COMPANIES.

    I know how to make the connections to the 2 databases, but not how to move the data I want. I would appreciate any help.

    Joan

  • This was removed by the editor as SPAM

  • Well there are several ways...

    1) the Linked Server way

    If you use linked servers, you can do a join on the tables in question to find the target rows (i'm assuming you know the syntax for that- see OPENQUERY for example).

    Once the rows are identified, you can use DTS to xfer them

     

    2) the non-Linked Server way...

    I've just completed a DTS package that does what you are talking about and I used this method because we have over 20 servers and keeping track of WHY a server has a linked server (to another) is becoming a hassle. So I used some DTS objects to copy the table to tempdb and do the join locally (I guess it doesn't matter which server is the host for this).

    If you'd like more info let me know but I just wanted to get the basic approaches out of the way.

    R

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply