CREATE OR REPLACE TRIGGER "TAB2_AI"
AFTER INSERT ON Table2
FOR EACH ROW
Select t.id INTO t1ID from Table1 t where and trim(upper(name)) = trim(upper(:new.NAME))
SELECT Table3_SEQ.nextval into t3Seq from dual;
Insert into Table3(ID,t1ID,t2ID,Active,CreatedDate) Values
when others then
'Error occured! New Row ID = ' || :new.ID );
I am writing after Insert Trigger. I have 3 tables. I need to write after Insert on Table2.
But in my Table 3 i want to insert table1 ID and table2 ID and other info.
Now getting the table1 ID is giving the problem. Please See below statement. This is causing the problem.
Select t.id INTO t1ID from Table1 t where and trim(upper(Dname)) = trim(upper(:new.NAME))
Could you please tell me the work around how to put select into in a trigger? Any suggestions highly appreciated.