Re: Triggers

From: arvind <arvind_at_mciworld.com>
Date: Sun, 03 Oct 1999 23:31:30 GMT
Message-ID: <mHRJ3.2327$Bf6.21910_at_pm02news>


Yo need a row level trigger to calculate the values every time a row is added and a statement level trigger to finally update the z3 column. This is to avoid mutating table problem . Please refer oracle application developers guide for the reason(But insert statement should not cause mutating table) .

HTH
Arvind
flavoue_at_my-deja.com wrote in message <7t2gnk$6m$1_at_nnrp1.deja.com>...
>Hi,
>Here is my problem :
>I have one table that I would like to update automatically.
>I used triggers to do that but it doesn't work.
>
>Table :
>ID_objet Attribute Value
>
>A Z1 12
>A Z2 10
>A Z3 120 (12*10)
>
>B Z1 5
>B Z2 3
>B Z3 15 (5*3)
>
>I would like to calculate automatically the values 120 and 15 each time
>I insert an object
>X with the attributes Z1 and Z2.
>The help documentation of oracle says that I have to create 2 triggers,
>one (type : for each row) that insert in a temporary temble the value
>of the product and
>one that update (type : for statement) the table. The second doesn't
>work.
>Does any body know why?
>
>Thank you a lot for your help.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Mon Oct 04 1999 - 01:31:30 CEST

Original text of this message