Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GET RID OF DUPLICATES
Message
De
28/11/2000 12:53:38
 
 
À
28/11/2000 12:19:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00446244
Message ID:
00446289
Vues:
10
>I have a table with the following fields:
>
>city
>state
>county
>territory
>
>There are several thousand records. I want to get rid of all of the duplicates; Just have one record for each unique record.
>
>Does anyone have an example of code that would go through the table and mark all but one of all duplicate records for deletion?


You might try something like

INDEX ON city+state+county+territory UNIQUE TAG myTag
SET ORDER TO
DELETE ALL
SET ORDER TO myTag
RECALL ALL
DELETE TAT myTag

That seemed to work in my quick and dirty test.

.......Rich
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform