The left part of the WHERE criteria must match the expression used in the index in order for it to be used.
select * from mytable where UPPER(FIELD) = PADL(value,4) will use the index.
select * from mytable where ALLTRIM(FIELD) = ALLTRIM(value) will not.
>What if it is in a SELECT - SQL... ?
>
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao