Please help me, how to fill in the correct values? Because the value is always less, and showing ERR not enough values the error is in here
Here is my code :
CREATE OR REPLACE TRIGGER REGION_HILMI_TRIGGER_WARNING
AFTER INSERT OR UPDATE OR DELETE ON REGION_HILMI
FOR EACH ROW
DECLARE
warning VARCHAR2(400);
BEGIN
IF INSERTING THEN
warning:='Terjadi penambahan data di tabel regions, dengan
nilai region_id='||:NEW.region_id||' dan
region_name='||:NEW.region_name;
ELSIF UPDATING THEN
warning:='Terjadi perubahan data di tabel regions, dengan
nilai lama region_id='||:OLD.region_id||',
region_name='||:OLD.region_name||' nilai baru
region_id='||:NEW.region_id||', region_name='||:NEW.region_name;
ELSIF DELETING THEN
warning:='Terjadi penghapusan data di tabel regions untuk
region_id='||:OLD.region_id||' dan region_name='||:OLD.region_name;
END IF;
INSERT INTO REGION_HILMI_HISTORY(OLD_REGION_ID,OLD_REGION_NAME,NEW_REGION_ID,NEW_REGION_NAME,CHANGE_TIME,DESCRIPTION)
VALUES(REGION_HILMI_SEQUENCE.NEXTVAL,USER,TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'),warning);
END;
/
Your INSERT statement shows only 4 items in the
VALUES
clause but 6 in the column name list. They must both match.