>I know that I could code a way to do this, but is there a simple way that I have overlooked?
>I need to identify all of the duplicates in a medium-size database, so that a human can look them over for possible deletion. Set UNIQUE on won't help in this case.
>I'm guessing that I have to scan and run loops to check for the dups and then send them to another file. Any better ideas?
>
>
>TIA,
>
>
>Ed
Ed,
Depends on how you define a duplicate.
If a duplicate is something that all fields match you could SQL union a table by itself.
If a field or field combination defines duplicate you could narrow SQL to those fields.
Another yet powerfull fox2x way is to relate the table by itself :
use myTable alias "copy1"
use myTable in 0 again alias "copy2" order tag DupFieldIdentifyingTag descending
set relation to myDupFieldCombination into copy2
browse for recno("copy1") # recno("copy2")
Cetin
function Copy2SecondRec