Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to find duplicates?
Message
De
18/06/1998 18:27:03
 
 
À
18/06/1998 17:40:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00109711
Message ID:
00109731
Vues:
18
>I have 500,000 records and need to find the estimated 100
>duplicate records based on 5 key fields. I would like to
>keep the record with the highest dollar amount and delete
>the others using the primary key.
>
>I am toying with the idea of performing a SQL Select
>and get records matching the group criteria with a count
>greater than 1. However, I will not have the proper PK
>when grouping. the other method is to sort the data and
>then compare the current record versus the previous.
>
>any thoughts on the best approach?

I wrote an app that dup checks using this code:


select * as Total_Dups
from Table
group by Key
having count(*) > 1
order by Key
into table HoldFile
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform