Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

AFTER INSERT TRIGGER should UPDATE SAME TABLE

700739Oct 9 2009 — edited Oct 10 2009
Hello, 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!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2009
Added on Oct 9 2009
10 comments
8,410 views