Hi Ger,
I don't think you're going to do this in a single operation. If you particularly don't want to select into a cursor, you could always select into an array as follows ...
Select Code From MyTable Group by Code into Array MyArray
NumRecs = Alen(MyArray)
Hope this is helpful.
Regards,
Liam
>Hi all,
>
>Is there a way of counting for the number of distinct values in a field.
>I need to find out the number of different codes in a field and dont really want to do a SELECT DISTINCT into a different table and count the number of records. Anyone any ideas?
>
>Thanks,
>
>Ger
Liam O'Hagan
MCP VFP Desktop Apps