>>Unless you are doing some other processing within the SCAN...
>>I think the following approach gives an equivalent result. How about
>>
>>
>>SELECT 5678 AS empid,task FROM employee;
>> WHERE empid=1234;
>> INTO CURSOR curTemp
>>
>>SELECT employee
>>APPEND FROM DBF('curTemp')
>>
>
>Is there a reason your method would be better?
His method involves only three commands and no loops, using no variables. It has all the prerequisites it needs to be faster, easier to read/maintain, whatever you like. It's also not depending on the record pointer at any given time. It's simply clean and neat. Also, my personal preference is to see code getting simplified and accelerated at the same time - and this does it. Don't feel intimidated with this, I actually like it the best when I do that with my own code.