[thelist] SQL: finding "new" records in a table

Matt Warden mwarden at gmail.com
Tue Sep 4 12:49:00 CDT 2007

I realize I did not answer part of your question, which is how to
identify changed records. See below:

On 9/4/07, Matt Warden <mwarden at gmail.com> wrote:
> 4) use a sproc or load tool to update changed records (update strategy)

Lacking a date_last_modified or similar tracking mechanism (you should
beat the original developers with a club, by the way), there is not
much you can do except find records where stage.fieldX != prod.fieldX
for fieldX = {each of your fields}

If one of the updates that can happen is a foreign key, well then
there are some more things you will need to consider, especially if RI
is turned off. But I will not go down that road unless you indicate it
is necessary...


Matt Warden
Cincinnati, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list