Hi.
For a one-off of 1000 records I would probably do something like:
Note. I commented out the COMMIT, so you could check the results.Code:DECLARE i NUMBER := 8; BEGIN FOR cur_rec IN (SELECT id_num FROM tab_prog WHERE progressive IS NULL ORDER BY id_num) LOOP i := i + 1; UPDATE tab_prog SET progressive = i WHERE id_num = cur_rec.id_num; END LOOP; --COMMIT; END; /
Cheers
Tim...




Reply With Quote