Please help a poor designer out...
When a row gets inserted into a table, I need to be able to calculate
some different values, and insert about another 3 rows into the *same*
table, based on the data originally inserted. The details aren't
important.
I am well aware that this violates the mutating trigger rules, and
have tried using the PL/SQL table work-around suggested by Mr. Kyte
amongst others, for which I thank you.
However, when I build the triggers and package to do this (not posted
for sake of brevity), I get a series of errors like this:
ORA-01438: value larger than specified precision allows for this
column
ORA-06512: at "SJH.TEST_PKG", line 6
ORA-06512: at line 2
ORA-04088: error during execution of trigger 'SJH.APV_AI'
ORA-06512: at "SJH.TEST_PKG", line 6
ORA-06512: at line 2
The ORA 04088 error is repeated several times, and then the trigger
exits, with no action.
Oracle support say that because I am inserting into the same table
with an after insert trigger on it, that I am creating an infinite
loop, and that this is why the trigger fails. I can quite see their
point, but am still not entirely convinced - is there *any* way around
this type of mutating trigger problem?
It would be great to solve, as this would let me keep most of the
business rules in the server, rather than resorting to client code.
Thanks in advance; any ideas will be *much* appreciated!
Simon
--
Simon Holt -- System Designer/DBA
** My opinions are not nescessarily those of my employers **
Britannia Zinc Ltd. Bristol, UK. (+44) 0117 982 3646
Received on Fri Jul 26 1996 - 00:00:00 CEST