Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing tables and memo fields
Message
From
27/12/2007 22:37:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/12/2007 21:27:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01278013
Message ID:
01278018
Views:
18
>How can I compare a historical table with a current table to see if the current table's memo field has changed? Is there a select statement that will do this? thanks in advance.

Sure you can do this, if you have a field, or field combination, that serves as a primary key.

I guess it would go more or less like this:
select OldTable.MyMemo, NewTable.MyMemo;
  from OldTable join NewTable on OldTable.PK = NewTable.PK;
  where OldTable.MyMemo # NewTable.MyMemo;
  into cursor Tmp
I would also suggest to use an audit trail, i.e., any change in any table goes to an audit table, i.e., a table of changes. You should record: what record in what table was changed; who did the change; and when. My introductory article on this topic may give you some ideas. Universal Thread Magazine, May 2003.
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
Next
Reply
Map
View

Click here to load this message in the networking platform