Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deletion of Duplicate Records
Message
From
30/10/2000 19:52:10
 
 
To
30/10/2000 14:28:15
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00435962
Message ID:
00436168
Views:
30
>I thank you for the suggestions. I currently have tried all of them. The best one that I found, which worked for this purpose, was from both Dore and Ken. The question that I have is there a way to keep everything in the same table without having to copy to a new table? Basically, the process everything is going through is via a REINDEXing program.
>
>Weekly, the records of this table (386,548 records)are being reindexed, but many of them are duplicate invoice no. (i.e. J123451 has 6 of the same records). I want to keep the first records and delete all proceeding records of the same invoice number. While I wish we could have a candidate key to prevent this, it's not the company's interest.
>
>Just for my knowing, would this be the most optimized process of clearing out deleted records?
>
>Thanks again for the help!!

use table in 0
use table again alias dupes in 0
select dupes
set order to primarykey
select table
set relation to primarykey into dupes
delete for recno() != recno("dupes")
set relation to
use in dupes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform