AFTER INSERT TRIGGER should UPDATE SAME TABLE
700739Oct 9 2009 — edited Oct 10 2009Hello, i have the following requirement. After a row is inserted in a table, a process should start. this process calculate some data and write it in other tables. this is realized by a procedure. after writing successfully to the other tables, the table with the after insert trigger should be updated to flag = 'COMPLETED'.
I created a after insert trigger on e.g. TABLE_A that calls the procedure. The procedure works fine, but after the other tables are written, the update does not work.
I get a ORA-04082 error, because in the procedure is the update + commit of TABLE_A.
When trying to use PRAGMA AUTONOMOUS_TRANSACTION it seems to work - no error is returned - but the update has not happened.
What can i do else?
Is there a solution? Or any other ideas to get this work?
THANKS!!