Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Want to remove duplicates from a table
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00406787
Message ID:
00406853
Vues:
48
See my 3 queries I just posted.

>it deleted ones that do not have duplicates. i would like to keep any records that do not have duplicates.
>
>brenda
>
>
>>select keyid, lastname+firstname customer, count(lastname+firstname), max(add_date) from mytable group by 2 having count(lastname+firstname) > 1 into cursor crsTemp
>
>>delete from mytable where lastname+firstname in (select customer from crsTemp) and keyid not in (select keyid from crsTemp)
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform