>I routinely receive updates to an existing table. I want to compare the old table to the new and record (in another table or view) only updated, added or delted records. I can write a program that will compare each record field by field, but can't help but think there might be an easier way.
>
>Any thoughts?
>
>Thanks
Two alternatives.
1) Instead of writing a loop, use SELECT statements, on the PK. This still has to be done on a field-by-field basis.
2) For the person who sends you the updated table, install an audit trail (change log). Have him send the audit trail instead of the entire table.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)