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 -> After Update Trigger

After Update Trigger

From: <dwgabel_at_telus.net>
Date: 14 Jun 2006 08:04:13 -0700
Message-ID: <1150297453.757297.23690@y43g2000cwc.googlegroups.com>


Hi, I'm kind of new to oracle (PLSql) and I'm trying to accomplish this

a row in a table is created (REQUEST table) the column is Null.(P_AND_I_LEAD_ID).
later in the workflow the P and I lead is assigned and their ID is placed in the column, my goal is to have a trigger to add the sysdate to another column in the same table (MY_P_AND_I_ASSINGED_DATE;

I'm just wanting to confirm that this statement won't update ALL of the rows.

CREATE OR REPLACE TRIGGER p_and_i_assigned_date_trigger

   AFTER UPDATE OF p_and_i_lead_id
   ON request
   FOR EACH ROW
   WHEN (old.p_and_i_lead_id = NULL )
BEGIN
   UPDATE request SET my_p_and_i_assigned_date = (select sysdate from dual);
END; Anyone mind helpling me ?

DG Received on Wed Jun 14 2006 - 10:04:13 CDT

Original text of this message

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