Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicates
Message
De
27/09/2011 00:54:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
01524786
Message ID:
01524787
Vues:
57
>Hilmar sent me this solution for tracking duplicates in a database a little while ago - it works very well.
>Further to this solution, how would i display the names plus an added field called field2 and attribute this information to a variable called myinfo.
>
>Thanks for your help.
>k

Guessing about exactly what you want to do:
select name, count(*) as count, field2 AS MyInfo ;
 from mydata;
group by name;
having count > 1;
INTO CURSOR TEMPDUPLICATE
if _tally > 0
MessageBox("Alert: There are duplicates.")
browse normal
endif
>
I believe VFP9 (maybe 8 as well) won't let you GROUP BY unless you include all non-aggregate columns. In that case you may need to temporarily SET ENGINEBEHAVIOR 70 to make the command work.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform