create or replace trigger nonViolation before insert or delete on reservation for each row declare error exception; error2 exception; dateres date:=sysdate; begin if inserting then if :new.dateDep<dateres then raise error; end if; end if; if deleting then if (:OLD.datedep=dateres) then raise error2; end if; end if; exception when error2 then raise_application_error(-20003,'supression impossible'); when error then raise_application_error(-20001,'reservation impossible'); end;
sysdate
if (trunc(:OLD.datedep) = trunc(dateres))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)