General information
Title:
Deleting Duplicate Records
I have a file which is derived from another file 99% of whose records
were imported from an outside database of part numbers. Of 137000
records about 500 are duplicates as many as 18 on a single number.
I wrote the code below to remove the duplicates and it works where
there are up to 3 duplicates but on the record with larger numbers
jof dupllicates it will delete say 13 of 15 leaving the 2 identical records
in the beginning of the duplication. Help.
use d:\stock\stock1.dbf
do while .not. eof()
m.check1 =number
skip 1
m.check2 = number
do case
case m.check1 = m.check2
delete
case m.check1 # m.check2
skip 1
endcase
enddo
pack
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only