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: Triggers and calculated fields

Re: Triggers and calculated fields

From: John Chiu <johnymc_at_netscape.net>
Date: Thu, 9 Dec 1999 06:39:21 -0500
Message-ID: <82o47n$o3s$1@news2.tor.accglobal.net>


You don't have to use a update clause in your trigger because it is a statement/row trigger for update. Use before update and by using the old and new value of your column(s) in your trigger, you can recalculate your columns before update to table.

HTH John Chiu

Michael <Michael.Wrobel_at_unisys.com> wrote in message news:82mog4$o5g$1_at_mail.pl.unisys.com...
> I want to use triggers to update calculated fields. I am creating a
trigger
> for each row after an insert, update, or delete. Something with the
trigger
> is not going through because no updates that were specified in the trigger
> are happening. Has anyone used triggers to keep calculated fields
updated.
> Is there a recommended strategy?
>
> I have 6 fields and if any are inserted, updated, or deleted, I want to
run
> an automatic recalculation for 2 calculated fields. I have been
attempting
> the recalculation with an update clause inside of the trigger.
>
> Thanks,
>
> Mike
>
>
Received on Thu Dec 09 1999 - 05:39:21 CST

Original text of this message

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