Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Triggers on Oracle7 - newbie
Hi. This is my first posting to an Oracle forum, please be patient with me,
I'm a clueless newbie in Oracle.
I want to create a trigger that updates a field when the contents of another field changes. I've tried two approaches but they both won't compile:
create or replace trigger t_oms_arr_af
before insert or update of ver_arr_status on oms_version_tbl begin if ver_arr_status = 'PASSED' then update oms_version_tbl set ver_arr_act_fin = sysdate; end if;
end t_oms_arr_af;
/
show errors
create or replace trigger t_oms_arr_af
before insert or update of ver_arr_status on oms_version_tbl begin if :new.ver_arr_status = 'PASSED' then update oms_version_tbl set ver_arr_act_fin = sysdate; end if;
end t_oms_arr_af;
/
show errors
The second one gives the error "NEW or OLD references not allowed in table level triggers". I'm using Oracle 7.
Thanks.
Keith.
Received on Tue Mar 22 2005 - 04:41:21 CST
![]() |
![]() |