Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting duplicate records
Message
De
08/10/2004 08:29:45
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00949847
Message ID:
00949848
Vues:
14
Check this download http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,54,33,22824

>My program had a bug and when inserted duplicate records. What SQL can I use to delete all the duplicates, but one?
>
>To find the duplicates I would use the sql below, but only want where cnt_text > 1. Then I want to delete all the records but the lowest sequence number (seq).
>
>select key, seq, desc, comp_dt, count(text) as cnt_text from tickler ;
>where desc = "Letter" and comp_dt = date()-1 ;
>order by key, seq ;
>group by key
>
>thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform