Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Update trigger, please HELP!
I have a table that stores mirrored information: when a record gets
inserted into the table, another record is inserted with a different
key, and a pretty much same set of values. This is implemented via the
AFTER INSERT ROW trigger.
I want to be able to keep information in synch between two rows (users can only modify the primary), and so I tried adding the AFTER UPDATE ROW trigger to update dependent row with changed values, only to get the "Table is mutating..." error.
So I tried the STATEMENT level trigger, figuring I will synchronize primary with mirrored rows for EVERYTHING, not just the ones that changed (not so desired, but, hey, as long as it works). Well, it did not work either: since the trigger calls for update on the same table, I get "Too many cursors ..." message. I guess, it ends up calling itself recursively, and I have no way of telling it NOT to go into recursive calls, or do I?
What can be done to solve this issue? Any suggestions are greatly appreciated! Please e-mail me directly at: avilner_at_usa.net
Thank you in advance.
Alex Vilner