Posted on 2007-11-16
I have a prod_ins1 table with st_type,st_sn,wheel. st_type,st_sn are loaded from another table.
Based upon st_type wheel has to be populated. After wheel is populated it has to be loaded into 'wheel' column on Main_prod table.
CREATE OR REPLACE TRIGGER prod_ins1
FOR EACH row
update prod_test1 set wheel =
case when st_type = 'Symm ' then 'Wheel 1'
when st_type = 'Clar ' then 'Wheel 2'
when st_type like '%RAM%' then 'RAM'
SELECT count(*) into vno from Main_Prod e where e.st_sn = :new.st_sn;
if vno > 0 then
update Main_prod set
where st_sn = :new.st_sn;
insert into Main_Prod(wheel)
ERROR at line 1:
ORA-04091: table MSUSER.PROD_TEST1 is mutating, trigger/function may not
ORA-04088: error during execution of trigger 'MSUSER.PROD_TEST1'
Can you please advise me??