I need a SCAN, not a single LOCATE.
>I agree with Sylvain. The Scan for is optimizable, although just for Borislav's delight, I'd just change the final code as:
>
>
>*-- Have an index on these two fields:
>INDEX ON EMPTY (InsCommand) TAG E_InsCmd
>INDEX ON SearchTB TAG SearchTB
>SET ORDER TO
>
>LOCATE ;
> FOR SearchTB = m.lcSearch AND NOT EMPTY (InsCommand) ;
> WHILE !plError
>
>
>If I understood correctly the use of plError. It looks like a parameter, but if this is the case, I can't imagine what does it have to do with the condition...
>
>Cheers,
If it's not broken, fix it until it is.
My Blog