General information
Category:
Coding, syntax & commands
>>vfp 3.0 and win 95
>>
>>I would like some suggestions for writing some
>>code to delete duplicate records that are created
>>on append and insert.
>>
>>I am working with clipper dbf files and have tried
>>literally everyway possible to prevent it from happening.
>>
>>Any thoughts?
>>
>>Thanks and have a good day!
>>
>>Becky
>
>Yet another method (assuming you're not using table buffering)...
>
>For this method to work, have index on jobnumber and SET DELETED ON.
>
>USE table
>USE table AGAIN IN 0 ORDER jobnumber table2
>SET RELATION TO jobnumber INTO table2
>SET SKIP TO table2
>
>With above relation set you can:
>
>DELETE FOR RECNO() > RECNO('table2')
>this will keep the first entry
>
>DELETE FOR RECNO() < RECNO('table2')
>this will keep the last entry
>
>BROWSE FOR RECNO('table2') # RECNO()
>to browse all duplicates so that you can see what's duplicated.
This is very efficient, I like it. Just one quibble - delete all.
Previous
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