I've just started working with Triggers. While trying to compile the next code fragment errors are listed in the log, like so: "Error(2,3): PL/SQL: SQL Statement ignored" and "Error(2,7): PL/SQL: ORA-00922: missing or invalid option". I don't understand the problem. Can anybody help?
CREATE OR REPLACE TRIGGER CONT_VIG
BEFORE INSERT ON CONTRACTS
FOR EACH ROW
WHEN (OLD.CLIENTID = NEW.CLIENTID AND OLD.ENDDATE > NEW.STARTDATE)
BEGIN
SET (OLD.enddate = :NEW.startdate-1);
END;