Red Gate forums :: View topic - Force updates rather than inserts
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK 10
SQL Comparison SDK 10 forum

Force updates rather than inserts

Search in SQL Comparison SDK 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
dinonz



Joined: 17 May 2013
Posts: 1

PostPosted: Fri May 17, 2013 3:33 pm    Post subject: Force updates rather than inserts Reply with quote

Hi,

I'm trying to do a comparison every 15 minutes and keep a target database up to date. I have fields whereby I can filter what has been added, and what has been changed in the last 15 minutes.

Problem is, adding that filter makes it want to "insert" all records that have changed, because they don't appear to be in the target data because they have not changed there. Is there a way to force the generation of SQL to always make update statement not inserts?

Dino
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Thu Jun 27, 2013 1:39 pm    Post subject: Reply with quote

If records are "changed", by definition that means Data Compare will script an UPDATE assuming the rows exist in both databases as identified by the comparison key.

If you want nothing but inserts, you can compare a database to a blank, empty database. But you can't make the SQL Data Compare Engine create INSERTS instead of UPDATES for rows that exist in both databases.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group