If I understand your question try...
SELECT COUNT(*) as keycount, keyfield FROM table1 GROUP BY upper(keyfield) ORDER BY upper(keyfield) HAVING keycount >1
Also, if you have a large table, make sure that you have and index on upper(keyfield)
Hope this helps //:^)
>no it means Select=SELECT=SELect etc.
>
>Arnon
>
>>
>>Could someone please set me straight. The VFP 5.0a help file states
>>"Neither Visual FoxPro nor BASIC are case-sensitive programming
>languages."
>>Shouldn't that mean that if I do a SELECT * FROM table1 WHERE keyfield =
>>"s422" I would get records where keyfield = "s422" and "S422"? That's not
>>working for me. So...how do I structure an SQL statement so I the
>duplicate
>>records when I do: SELECT keyfield FROM table1 GROUP BY keyfield HAVING
>>COUNT (*)>1?
>>
>>Jeff
>>
>>