Try this:
sele ... group by ... into cursor yy readwrite
repl all uniqueid with recn()
>That worked great, except (and I should have had this in my posted SQL)...
>
>I'm also using a GROUP BY clause which then causes all the UniqueID values to be the same.
>
>>Try this:
>>
>>....
>> RECNO() AS UniqueID ;
>>....
>>
>>
>>>I'm trying to return 1 for the value of the UniqueID field in the first record and then increment each subsequent record in MyCursor. The SQL below returns all "1" in the resulting records. I'm sure this is because the pointer does not move in MyTable, but there must be a simple way. I was lookng at AutoInc, but that doesn't seem to be applicable to cursors. We have a GetNext functionality for tables but I don't need it here. I'm sure it's simple, but it's not coming to me right now.
>>>
>>>
>>>SELECT ;
>>> MyTable.Field1, ;
>>> RECNO('MyTable') AS UniqueID ;
>>> FROM MyTable ;
>>> INTO CURSOR MyCursor
>>>