>here is an other way to come to the result (thanks to Brad Schulz)
>
> lnMyNum = 0
> SELECT myTable, GetRunningNumber() AS MySeq FROM myTable INTO CURSOR MyCursor NOFILTER
>
> FUNCTION GetRunningNumber
> lnMyNum = lnMyNum+1
> RETURN lnMyNum
> ENDFUNC
>
>Best Regards,
>
Hi Koen,
The correct version was posted earlier in the Message #
1309984. Yours will start numbering from 2 because of extra pass VFP SQL Engine is doing to determine field size for the result set.
--sb--