Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check two files for record duplication
Message
From
21/06/2010 12:30:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/06/2010 12:09:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01469886
Message ID:
01469950
Views:
40
>Creating an extra field filled with SYS(2017) and then comparing that field seems to work. I am double checking. Will let you know results.
>
>Thanks Naomi and Hilmar,
>
>Alex

It works this way. If you don't find the checksum of a record you want to add, in the history table, then you know for sure that you can add the record.

If you do find the checksum in the history table, you have to do additional verifications, to see whether all the values are, indeed, the same. It is possible that different sets of values give the same hash. With a 32-bit checksum, the probability for this happening for a single record is very small (1 / 2^32), but if you add 1000 records, and already have 100,000 records in the history table... well, you can multiply the probability of getting a conflict on SOME set of records (even if they are all different) by 1000 x 100,000 in this example.
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