>>>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)