Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deletion of Duplicate Records
Message
De
30/10/2000 19:52:10
 
 
À
30/10/2000 14:28:15
N. Lea
Nic Cross Enterprises
Valencia, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00435962
Message ID:
00436168
Vues:
31
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform