Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update table 1

Status
Not open for further replies.
Mar 12, 2003
678
US
I want to update a table on one server from a table on another server using dts where only new transactions are updated. I have brain farted and and have no idea howe to do it. Any help would be apprecited.
 
First you'll need to add a linked server to the destination server

Then you would do something like this (pseudocode):
Code:
UPDATE a
   SET a.somefield = somevalue
  FROM table a
 INNER JOIN linkedservername.databasename.schema owner.tablename b
    ON a.field1 = b.field1
 WHERE b.transaction = 'Updated'
Is this what you are looking for or am I way off here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top