Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check two files for record duplication
Message
De
21/06/2010 12:30:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
21/06/2010 12:09:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01469886
Message ID:
01469950
Vues:
28
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform