Get rid of ALLTRIM and STR. The statement on the left side of the equal sign must EXACTLY match the index key. If you need to index a string of the number, use PADR.
>If I'm searching a lookup table with a command like:
>
>locate for alltrim(str(n)) = alltrim(strtran(crsTemp.fnode,"-","")) and ;
> alltrim(st_name) <> alltrim(strtran(crsTemp.on_str,"-","")) and ;
> alltrim(st_name)<>""
>
>
>how should the indexes be setup to maximize rushmore speed? Both tables are under 10000 records. The lookup loop will execute about 15000 times so I'm trying to speed it up as much as I can.
>
>Or perchance would an SQL select be a better option?
>
>Thanks for any wisdom.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer