Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Update trigger, please HELP!

Re: Update trigger, please HELP!

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 30 Apr 1999 19:24:49 +0200
Message-ID: <925492947.3259.0.spot.d4ee154e@news.demon.nl>


Generic solution
create a package, holding a table with rowid's or primary keys before insert on statement level, reset the table after insert row, capture the rowid of primary key in the table, adding an element for each row
after insert on statement level: update the other rows based on the array. A few months ago Thomas Kyte posted a complete example.

Hth,

Sybrand Bakker, Oracle DBA

avilner_at_usa.net wrote in message <7gclsb$pd$1_at_nnrp1.dejanews.com>...
>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
>
>----- Posted via Deja.com, The People-Powered Information Exchange -----
>------ http://www.deja.com/ Discussions * Ratings * Communities ------
Received on Fri Apr 30 1999 - 12:24:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US