Force newly updated rows from a source to a target database?

I've been using SQL Data Compare for years but I can't figure out a way to do this simple task...

I'm updating rows in my source database and it has a column called "DateUpdated". This field will get set to today's date when new data is written to the row, either by insert or update.

So for SQL Data Compare, I only want to compare the rows where "DateUpdated" is >= (today). The key from the source and destination database should match and there would be an update (DateUpdated is not part of the key.). If there is no match, insert it.

Here's how I've tried to set it up...

1. In the Tables and Views dialog, I've set the Comparison Key for the table to be the key that matches the rows between the source and target.
2. For the WHERE clause, I've tried two things: " DateUpdated >= '2024/12/3' " for both tables, or " DateUpdated >= '2024/12/3' " for just the source table.
3. If also tried to remove some of the Columns for Comparison, but if I remove them, the updates for these columns don't get deployed.

I feel like I'm missing something basic. Anyone have some advice or is this just not possible without having to compare a much larger subset of rows?

Answers

Sign In or Register to comment.