>>Terry,
>>
>>This is off-the-wall and I haven't tested it, but what about this:
>>
>>SELECT RECNO('invoice') AS invrec, a.fname, a.lname, b.invoice FROM Customer a, Invoice b WHERE a.num = b.num INTO CURSOR lcTest
>>
>>Note the change to how RECNO() is being used.
>>
>>
>
>John/Mike:
>
>I'm surprised at you guys! < BG > You know you can't use an alias name in a SQL SELECT statement for RECNO(). It's clearly stated in the docs.
>
>John, your solution to do it in two parts will work.
Yep, RECNO() is not reliable in situations involving morethan asingletable. If it's needed, pull it in as a field as a separate step (it often pays to perform the WHERE filter segments that operate the single table in a Rushmore-optimizable fashion in the initial step) and then use the result with RECNO() embedded as a field in later steps.
If you are going to need the indexes for later use, COPY TO...WITH PRODUCTION maybe worth considering.