>>>NewEmpID=5678 >>>select employee >>>scan for employee.empid=1234 >>> currec=recno() >>> insert into employee(empid,task); >>> values (NewEmpId,employee.task) >>> goto currec >>>endscan >>>>>
>>SELECT 5678 AS empid,task FROM employee; >> WHERE empid=1234; >> INTO CURSOR curTemp >> >>SELECT employee >>APPEND FROM DBF('curTemp') >>>
REPLACE ALL myField WITH somevalue FOR conditionrather than
SCAN FOR condition REPLACE myField WITH somevalue ENDSCANBy taking all the extra record changing out of the equation I think my method will be significantly faster. Of course, significantly faster is a relative term and a large percentage improvement may not be meaningful.
INSERT INTO employee ; (SELECT 5678 AS empid,task FROM employee e2; WHERE e2.empid=1234)be a legal statement in either???