>When you scan a table and you replace a specific field, when that field is part of an index, it is extremely slow as oppose to not having an index. I understand there might be complex routines being executed on the back. But, for something that I do a lot of times, it would be extremely useful if the product would be able to deal with that in a more powerful way. Any comment?
Hi Michel,
It's bad idea to do that for a different reason. When you update field in the current index, the records is moved in that index so the next record may not be the one that was before update. As result you may miss some records in your SCAN loop. In such cases I ususly use following technique.
SELECT filed1, field2, field3, RECNO() AS RecordNo ;
FROM mytable ;
ORDER BY filed1, field2, field3 ;
INTO CURSOR crsSorted
SET ORDER TO IN mytable
SET RELATION TO RecordNo INTO mytable
SCAN
...
ENDSCAN
--sb--