Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Mutating table
Suppose you have a master-detail schema. Let the master be
TABLE bill
billid NUMBER
...
billtotal NUMBER
PRIMARY KEY billid
The detail table holds the bill lines, something like
TABLE billline
billid NUMBER billlineid NUMBER billarticle NUMBER billlinetotal NUMBER
In the master table you want to have the
sum of all the <billlinetotal>
fields of the detail lines.
When I set up a trigger on insert of
the detail table, to update the master
field, I get a MUTATING TABLE error.
So, the question is:
How can I update fields of
the master table when inserting
detail table rows?
Thanks.
-- 8^) bagnonm_at_inta.es 8^) Oh, I am a C programmer and I'm okay I muck with indices and structs all day And when it works, I shout hoo-ray Oh, I am a C programmer and I'm okayReceived on Tue Mar 10 1998 - 00:00:00 CST