Home » SQL & PL/SQL » SQL & PL/SQL » update trigger....plz help me ....
update trigger....plz help me .... [message #39399] Mon, 15 July 2002 04:31 Go to next message
rmn
Messages: 2
Registered: July 2002
Junior Member
i want to update table t2 after insert record in table t1
where t2.id=t1.k

SQL> CREATE or replace trigger aftr_inst_t1_tgr
2 after insert on t1
3
3 DECLARE
6 v_cmp_no number;
7 BEGIN
8
8 update t2 set cmp_cd='8'
9 where id=:NEW.k;
10 END;
11 /
CREATE or replace trigger atr_inst_t1_tgr
*
ERROR at line 1:
ORA-04082: NEW or OLD references not allowed in table level triggers
Re: update trigger....plz help me .... [message #39400 is a reply to message #39399] Mon, 15 July 2002 05:04 Go to previous message
Mahesh Rajendran
Messages: 10690
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
/*try this*/
CREATE or replace trigger aftr_inst_t1_tgr
after insert on t1
for each row
DECLARE
v_cmp_no number;
BEGIN
update t2 set cmp_cd='8'
where id=:NEW.k;
END;
Previous Topic: Remote INSERT with VARRAY
Next Topic: Cursors
Goto Forum:
  


Current Time: Sun Oct 20 00:53:27 CDT 2019