Sql Help. Compare and update records in 2 identical tables in diff server

  • Thread starter Thread starter sleepyant
  • Start date Start date
S

sleepyant

Hi, I have 2 identical tables in each server that I need to compare and
update/insert accordingly using SQL.

For example, server A as a source and Server B as destination which both
have Table1. I need to compare records in Server A with those in Server B
and insert the records in Server B if not found, or update exisitng if found
but with different timestamp. In short, just like updating a remote database
so that both are identical. How can I achieve this?

Please help. Thanks.
 
Sleepyant,

The roughest method is in my opinion inserting all rows from B in A. When
they exist already an error should be trhowed.

Just my thought,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top