Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shorter way
Message
 
 
À
08/04/2011 12:15:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
01506660
Message ID:
01506662
Vues:
89
>I have a table MyCust.dbf with the records:
>
>
>Cust_id
>-------
>00001
>00001
>00001
>00002
>00003
>00002
>
>
>what is the shorter way to delete all those double entries, so each ID only has one records?
>
>thanks for the help
>
>Jerry

Try
Use myCust.dbf exclusive
select Cust_ID from myCust group by Cust_ID into table MyTempCust 
if _tally > 0
   zap in myCust
   insert into myCust select * from myTempCust
endif
delete file MyTempCust.dbf
catch to loException
   && Handle it here
endtry
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform