You can use SYS(3054,11) to check optimization level. My tests show that VFP is "smart" enough to match join condition to the index expression in this case.
>I have an index on two fields. Would an expression like the following be Rushmore-optimized, that is, would the index be used?
>
>
>select (some fields);
> from Table1 join Table2 on bintoc(Table1.Field1) + bintoc(Table1.Field2);
> = bintoc(Table2.Field1) + bintoc(Table2.Field2)
>
>
>Suppose that one table, or both, are indexed on
bintoc(Field1) + bintoc(Field2).
>
>It seems to me that the answer is "no", since, because of the alias, the expression no longer "exactly matches the index". In that case, how can the index be utilized efficiently?
>
>I know I can use a lookup function (I have a generic UDF for lookups), but I was thinking whether there was a way in "pure SQL".
>
>TIA, Hilmar.
--sb--