Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql to find duplicates
Message
De
17/07/2003 12:08:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00811118
Message ID:
00811129
Vues:
9
>>>Hi,
>>>Can someone help me with the SQL to find all duplicates in a field?
>>>Thanks,
>>>Allen
>>
select KeyFld, count(*) as CntDups from TestDups group by 1 ;
>>     having CntDups > 1 ;
>>     into cursor curDupes
>>
>
>Sorry but I did get it...
>Keyfld for me is lineitems_id
>TestDups table is lineitems
>What's CntDups... a variable?
>
>Allen

When selecting an expression, it is best to give it a name, instead of having VFP assign one automatically. Sergey decided to name this field CntDups (count duplicates).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform