Title: RE: Avoding Mutation of Table trigger
Hi all,
 
I have  row level table trigger  to fire on DELETE or INSERT or UPDATE Mode .
It has to fire on certain condition, meaning I have a WHEN condition also.
 
WHEN Condition is like :
       when ( NEW.CR_ACCOUNT is not null and   NEW.CHQ_DT is not null )
 
Since, in DELETE mode NEW value contains null  ,  it does not fire.
 
This Problem would have solved if could write WHEN Condition as
 
       when ((INSERTING or UPDATING) and NEW.CR_ACCOUNT is not null
                  and   NEW.CHQ_DT is not null ) OR
                (DELETING and OLD.CR_ACCOUNT is not null  and   OLD.CHQ_DT is not null )
 
But in WHEN condition one can not write INSERTING or UPDATING.
 
How do i go about it ? Any round about way ?
 
Thanks & Regards.
 
Naba
 

Reply via email to