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 -> Re: :NEW Values in trigger doesn't seem to work

Re: :NEW Values in trigger doesn't seem to work

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Tue, 25 Jul 2006 21:57:37 +0200
Message-ID: <ea5ss4$sjq$1@news6.zwoll1.ov.home.nl>


rgrubin_at_yahoo.com schreef:
> I have the following trigger:
>
> CREATE OR REPLACE TRIGGER NIKU.FCG_UPDTASK4PROC_T1
> AFTER INSERT
> ON NIKU.FCG_METLIFE_TASKUPDATES
> REFERENCING NEW AS New OLD AS Old
> FOR EACH ROW
> DECLARE
> vMsg VARCHAR2(30) := 'New ID=' || :NEW.TASK_ID;
>
> BEGIN
> UPDATE ODF_CA_TASK
> SET testfield = '7'
> WHERE id = :NEW.TASK_ID;
>
> --dbms_output.put_line(vMsg);
>
>
> END FCG_UPDTASK4PROC_T1;
>
> The problem is, the update doesn't seem to happen. However, if I
> replace :NEW.TASK_ID in the WHERE clause with a hard-coded value, it
> works. When outputing the value of :NEW.TASK_ID to dbms_output the
> correct and expected value is displayed, yet the update does not
> happen. I do not receive any Oracle errors and am running out of ideas
> and patience.
>

How do you know it's not happening?
Is the -unknown- value of FCG_METLIFE_TASKUPDATES.TASK_ID present in ODF_CA_TASK?

Do you test this in a CLI session? Did you actually commit?

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Tue Jul 25 2006 - 14:57:37 CDT

Original text of this message

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