What about:
SELECT * FROM Facture WHERE (FA_GENRE = "FA") AND (ABS(FA_TOTAL) > ABS(FA_ZPAYED)) INTO TABLE Tmp ORDER BY CL_Code
The thing is you cannot ask SQL to use a specified index. VFP will determine which index to use based on the SQL conditions. To have Rushmore work with the above SQL, you will need a non-filtered index on:
- FA_Genre
- ABS(FA_Total) and
- ABS(FA_ZPayed)
HTH
>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