You don't have to change SET ANSI in VFP9. The LIKE operator will be optimized if an index on itm_numb exists regardless of SET ANSI setting. It's also compatible with other databases.
SELECT itm_numb,itm_desc FROM A WHERE itm_numb LIKE 'STI%'
>Do you have an index on itm_numb ?
>
>If you have SET ANSI OFF, then you should be able to just use:
>
>
>SELECT itm_numb,itm_desc FROM A WHERE itm_numb='STI'
>
>
>which should take advantage of the index which you should then be able to confirm with the SYS(3054, command.
>
>
>By using SUBSTR(itm_numb,3) you're not allowing RUSHMORE to optimize unless you specifically have an index on SUBSTR(itm_numb,3)
--sb--