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:15:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/06/2010 11:47:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01469886
Message ID:
01469937
Views:
36
>>>>Perhaps with the selfsame command, but adding an index on the key expression - an index on dtos(dTraBan) + cRefBan..., especially in the historical file.
>>>
>>>Thanks Hilmar. Tried and didn't seem to help much.
>>>
>>>Alex
>>
>>Other options include an outer join, and doing a SET RELATION to the history table (copy those that have something like eof("HistoryTable")). I am not sure whether any of these options would be faster.
>
>Hilmar and Naomi,
>
>I am going to add a column with a hash of the others and compare the hashes. Looking for hash function...
>
>Alex

With any hash function, it is possible that two different values produce the same hash. So if you have a matching value, it is safest to check whether the values are really the same. This doesn't seem very practical in the present case.

The probability of such a "collision" gets smaller if you use larger hashes. The Visual FoxPro function is sys(2007); the default is a 16-bit checksum; you can use an additional parameter for a 32-bit checksum.
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