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: Mutating table

Re: Mutating table

From: Valgard Berserkr <zlmartin_at_correu.gencat.es>
Date: 1998/03/11
Message-ID: <6e5l2h$1vk@lilith.uab.es>#1/1

Some solutions :

  1. Drop the billtotal column, you'll have more complicated and slower queries. Disadvantage : speed.
  2. Drop the foreign key that references the bill table. You'll need to ensure referential integrity via triggers. Disadvantage : lots of extra code.
  3. Compute the billtotal in your application, calling a stored procedure for instance. You can't ensure the integrity absolutely, but it could work. Disadvantage : integrity.

hth

>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?
Received on Wed Mar 11 1998 - 00:00:00 CST

Original text of this message

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