Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recording changes to a table
Message
From
04/09/2003 12:05:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
04/09/2003 11:42:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00826066
Message ID:
00826089
Views:
24
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform