Respected Sir,
I have a doubt in triggers..
Im having a table FIXED_DEPOSIT that has following fields:
FD_NO, Debit_ACNO, DURATION, FD_TYPE, INT_PERIOD, PAYMENT_MODE, Credit_ACNO, DD, RQSTD_DATE, MATURITY_DATE, AMOUNT
and rqstd_date is the sysdate..
i insert all the fields except the sysdate and maturity_date.
sysdate is made default.
To insert the maturitydate,i used the following trigger.,
CREATE OR REPLACE TRIGGER update_mdate
AFTER INSERT OR UPDATE ON FIXED_DEPOSIT
FOR EACH ROW
BEGIN
UPDATE FIXED_DEPOSIT SET maturity_date=(SELECT ADD_MONTHS(sysdate,duration)+1 FROM dual);
END;
/
I dont know whether it is correct or not ,but it is not showing any error when compiling,
but when executing it is showing the following error,
table fixed_deposit is mutating,trigger/function may not see it
error during the execution of trigger 'update_mdate'
please help me to get rid of this error.
thanking you,
S.Kokila
-
Triggers (1 messages)
- Posted by: kokila s
- Posted on: February 12 2004 03:59 EST
Threaded Messages (1)
- Triggers by Elangovan Kandasamy on February 27 2004 09:11 EST
-
Triggers[ Go to top ]
- Posted by: Elangovan Kandasamy
- Posted on: February 27 2004 09:11 EST
- in response to kokila s
Mutating basically means that it is trying to enter a record into that column more thatn once. It could be some other trigger or a side effect of the trigger that you wrote to insert/update. Check your constraints for that field and make sure that you are not defaulting that column as well.