Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: :NEW Values in trigger doesn't seem to work
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