Cannot use if condition when i create trigger

I tried to create trigger as below, but show [Err] ORA-24344: success with compilation error. if i don’t put if condition in script then working fine. I can’t find where is wrong, anyone help me please..

CREATE or REPLACE TRIGGER TRIG_DAILY_LOG_SMS
AFTER INSERT ON JDB_DAILY_LOG_SMS
FOR EACH ROW
BEGIN
    IF (:new.TRN_CODE='CDS') THEN
         INSERT INTO JDB_TRIGGER_DAILY_LOG_SMS (TRN_REF_NO,AC_NO,AC_CCY,DRCR_IND,TRN_CODE,FCY_AMOUNT,LCY_AMOUNT,TRN_DT,AUTH_STAT,BALANCE_UPD,AC_ENTRY_SR_NO,STATUS) 
         VALUES (:new.TRN_REF_NO,:new.AC_NO,:new.AC_CCY,:new.DRCR_IND,:new.TRN_CODE,:new.FCY_AMOUNT,:new.LCY_AMOUNT,SYSDATE,:new.AUTH_STAT,:new.BALANCE_UPD,:new.AC_ENTRY_SR_NO,'NEW');
    END IF;
END;
/


Source: oracle

Leave a Reply