HELP with triggers and updates;

From: Patrick McCarthy <pmccarth_at_rpc.unb.ca>
Date: 1995/12/13
Message-ID: <4an8po$q1s_at_sol.sun.csd.unb.ca>#1/1


I am knew at Oracle programming. I have Oracle 7.1.4 on Solaris 2.4.

My problem is this. I am trying to write a trigger which activates when the field "STATUS" in my table is updated. The field is being updated to 'FIRED'. I don't want the field to read 'FIRED', I would like it to always read 'PENDING'. Therefore when this field is updated to 'FIRED' I want to change it back to 'PENDING' with a trigger. Is this possible. I tryed it with a trigger something like the following;

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
create trigger status_action
after
update of status
on test
begin
>>>>>>I need somekind of statement here to change it
>>>>>>ie set status = 'PENDING' where status = 'FIRED'
end;
/
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks in advance

Patrick McCarthy
pmccarth_at_rpc.unb.ca Received on Wed Dec 13 1995 - 00:00:00 CET

Original text of this message