General information
Category:
Coding, syntax & commands
Jim,
Best I know, you don't/can't!
SQL "reserves the right' to do it whichever way it pleases, and in fact your current observations may not hold if, for instance, file sizes change relative to each other.
I **guess** that if you included RECNO(alias) it still wouldn't help, as I *suspect* that it would use the same record from alias for each record processed by SQL.
I suppose that if you really want/need RECNO for the particular file you could break the SQL into two, first selecting *only* from the file whose RECNO you need, then using that record set as input to the real Select you want executed. Kludgy, but should do the job.
Good luck,
Jim N
>Hello all,
>
>I can use
>
> SELECT RECNO() FROM customer ;
> WHERE customer.custid = "001"
>
><\PRE>
>to get a handy list of pointers to records in customer.dbf.
>
>But if I use
>
> SELECT RECNO() FROM customer, order ;
> WHERE customer.custid = "001" .AND. ;
> order.orderid < "999"
><\PRE>
>it selects the RECNO() from order .dbf.
>
>If I use
>
> SELECT RECNO() FROM order, customer ;
> WHERE order.orderid < "999" .AND. ;
> custoemr.custid = "001"
><\PRE>
>it still selects the order.dbf record number.
>
>How do I tell a SQL SELECT statment which table I want to selct the RECNO() from?
>
>Any ideas?
>
>Regards,
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only