>>You can use local aliases.
>> SELECT RECNO("Cust") AS CustRecNO, RECNO("Ord") AS OrdRecNo ;
>> FROM customer Cust, order Ord;
>> WHERE Cust.custid = "001" AND ;
>> Ord.orderid < "999"
>
>I have not been able to make it work. What is selected as the RECNO() in each case is the record in customer or order what was initially being pointed to when the SELECT command was issued. For instance, if the pointer in customer.dbf was at record 100 and the pointer in order was at record 50 when you issued the SELECT command as above, you would get two columns as follows:
>100 50
>100 50
>100 50
Of course it works that way. The others have posted the theory here, so I won't repeat it. Just a shorthand workaround:
SELECT *, RECNO() AS CustRecNO;
FROM customer Cust;
WHERE Cust.custid = "001" ;
INTO Cursor Tmp1
SELECT tmp1.*, < ord.somefield(s) >;
FROM Tmp1 Cust, order Ord;
WHERE Cust.custid = ord.custid AND ;
Ord.orderid < "999"
Now the final cursor will have the CustRecNo properly filled. Recno() in SQL select works on single table queries only.