I am new to PL/SQL programming and i've been task to create a simple trigger; see code below:
CREATE OR REPLACE TRIGGERÂ TRG_ACCT_IDW
AFTER INSERT ON ACNTGROUPS
FOR EACH ROW
BEGIN INSERT
INTO IDWORKS_HC (ACCOUNT,IDW_CATEGORYNO,GRTYPE)
VALUES
(:NEW.ACCOUNT,:NEW.GROUP_,:NEW.TYPE)
WHERE ACNTGROUPS.TYPE = '1'
END;
Everything works great without the where clause. Can an 'after insert' trigger have a condition clause? does my code above need reformating? thanks in advance.