>From VFP 7 help:
>
>Each Order_Item must correspond to a column in the query results and can be one of the following:
>...
>A numeric expression indicating the location of the column in the result table.
>
>However, the following program causes error
>
>SQL: Column 'NORDER' is not found.
>
>How to use expressions in ORDER BY clause ?
>
>
>norder = 1
>CREATE CURSOR test ( test c(1) )
>SELECT * from test ORDER BY (norder)
>
It actually is helpful when you have expressions and not existing columns :
select top 10 rand()*100, * from myTable order by 1 && Select randomly 10
&& In VFP top 10 doesn't actually mean top 10 if 10th matches say 2 more records they're included too
select lastname-(', '+firstname), year(date())-year(birthdate) from mytable ;
order by 2 descending, 1
Cetin