By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Nov 21 '05 #2

P: n/a
How about using SQL Replication?

"sleepyant" <no@no.no> wrote in message
news:ed**************@TK2MSFTNGP14.phx.gbl...
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.

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.