Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle after update trigger

Oracle after update trigger

From: Chris <c.p.cash_at_swansea.ac.uk>
Date: 20 Sep 2006 04:05:11 -0700
Message-ID: <1158750311.769260.119520@i42g2000cwa.googlegroups.com>


Hi,

I am relatively new to databsae triggers and I am currently having a problem with an UPDATE AFTER trigger. I am using Forms 6i to perform a few calculations and then commit then to the database. When these records have been updated in the database (AFTER UPDATE) i want to create a trigger that will perform further calculations.

The code I have which is causing me a few problems is:

CREATE OR REPLACE TRIGGER update_rech_figures  AFTER UPDATE ON uws_rech_cash
BEGIN
   IF non_exception_total_award IS NOT NULL AND

      exception_total_award IS NOT NULL THEN
         summ_total_award := NVL(non_exception_total_award,0)
                                        +NVL(exception_total_award,0);
        END IF;

   END; The non_exception_total_award & exception_total_award are the figures that are returned from the form. I want the trigger to add them together when they have been updated to the uws_rech_cash table.

Thanks in advance
Chris Received on Wed Sep 20 2006 - 06:05:11 CDT

Original text of this message

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