>>>>Bobby Jones 1
>>>>Jamie Lee 2
>>>>Terry Hatcher 3
>>>>
>>>
>>>If you're creating a VFP cursor, then you effectively get a RECNO() column without needing to have any sort of "IncrementThisValueByOne" column. Can you not just use that?
>>
>>No, it doesn't always start with 1 for each cursor.
>
>Hmm, set-oriented SQL is not always the best choice for row-oriented logic like this. You might be better off sticking with xBASE:
>
>m.lnOffset = < some integer value >
>
>SELECT ;
> MyColumnOne ;
> , MyColumnTwo ;
> , CAST( 0 AS I ) AS IncColumn ;
> ...
> INTO CURSOR Output ;
> ORDER BY ... ;
> NOFILTER READWRITE
>
>SELECT Output
>REPLACE ALL ;
> IncColumn WITH RECNO( "Output" ) + m.lnOffset ;
> IN Output
>
Very simple with derived tables in VFP9 - see my reply to Jay.
If it's not broken, fix it until it is.
My Blog