Force updates rather than inserts

Automate and integrate using the SQL comparison API

Moderators: Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

Force updates rather than inserts

Postby dinonz » Fri May 17, 2013 3:33 pm


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?

Posts: 1
Joined: Fri May 17, 2013 3:29 pm

Postby Brian Donahue » Thu Jun 27, 2013 1:39 pm

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.
Brian Donahue
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Return to SQL Comparison SDK 10

Who is online

Users browsing this forum: No registered users and 0 guests