>>Ed,
>>
>>Your suggestion below does not work because in ...ORDER BY Paye, Paye is not a field, but an index tag... and Paye does not subsitute itself by the index expression in the SQL.
>>
>>USE Facture IN 0
>>SELECT * FROM Facture INTO TABLE Tmp ORDER BY Paye
>>USE IN Facture
>>BROWSE
>>
>
>Well, in the absense of adequate information, it's difficult to figure out what to use for names. My own practice is to use the names of fields for tags; clearly this differs from your practice. You could, if you wanted to, restate the select I proposed to accurately reflect the data in your tables. Good luck.
----------------------
Ed,
I also use the names of fields for tags when it is a direct simple index.
Like ORDER CLT_CODE for the field CLT.CLT_CODE C(7).
But in this case the index is:
Index tag: PAYE
Key: CL_CODE For: FA_GENRE="FA" AND ABS(FA_TOTAL)>ABS(FA_ZPAYED)
And I already have an index with the name of CL_CODE
See?