>>>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
>
I understand; not everything can equate to a simple field name. The index youhave here is not useful for SQL Select purposes; Rushmore doesn't use filtered indexes to help with the record selection process. You could alter the select I gave to order by the field and move the FOR clause into the WHERE; indexes on the three elements of the FOR would help; if you need to operate on the ABS() of a field for selection purposes, a simple index on the field won't help; you'd need a tag on the ABS() of the field to avoid evaluation record-by-record.