Hi Sergey:
I want a result that contains only 1 row per FOO value, rather than the current table, which has duplicate rows with the same value for FOO. Please see Naomi's solution.
Thanks as always for responding so quickly.
Yossi
>You didn't say what result you want.
>
>>
>>I have a table where there are dupes in a particular column, FOO. I want to create a cursor that will contain only one record per FOO, so I coded:
>>
>>
>>SELECT * ;
>>FROM ImpHeader ;
>>ORDER BY FOO ;
>>GROUP BY FOO ;
>>INTO CURSOR curHeader READWRITE
>>
>>
>>VFP doesn't like the GROUP BY, but it is a pain to GROUP BY all the other fields or aggregate them. I do need the data from the other fields, so SELECT DISTINCT FOO would not help.
>>
>>What is the solution?
>>
>>Thanks,
>>
>>Yossi