Hi to all,
There exists a way for rollback only a part of transaction and not all the entire transaction?
For example I have the following situation:
begin
savepoint noIns;
FOR rRecords IN (SELECT *
FROM TableA)
LOOP
begin
insert into TableB (field_1) values (rRecord.field_1);
exception
when dup_val_on_index then
rollback to noIns;
end;
UPDATE TableA
SET field_2 = 'OK'
end loop;
end;
If happen the DUP_VAL_ON_INDEX exception I want to rollback only the rows inserted in the TableB, while the rows updated in TableA must not rollback.
There exists a way for to do this?
Thanks in advance!