SELECT _tmp INDEX ON id TAG id2. Execute this code
SELECT Table1 SET RELATION TO id INTO _tmp replace ALL table1.field1 WITH _tmp.field1 SET RELATION TOThe relationship will move the _tmp cursor record pointer to always match up it's ID with the Table1 ID.
>>select * from table1 into cursor _tmp READWRITE >> >>Then I modify one field in _tmp cursor .. and then I want to update Table1 with new modifications.. >> >>SELECT _tmp >>SCAN ALL >> SELECT table1 >> LOCATE FOR table1.id = _tmp.id >> IF FOUND() >> replace table1.field1 with _tmp.field1 >> ENDIF >>SELECT _tmp >>ENDSCAN >>>>
UPDATE Table1 SET table1.field1 = _tmp.field1 FROM _tmp WHERE table1.id = _tmp.id