Описание
Установка даты возникновения отклонения
Определение
CREATE TRIGGER DEVIATION_SETDATE FOR DEVIATION
ACTIVE BEFORE INSERT POSITION 0
as
begin
if (new.DEVIATIONDATETIME is null) then begin
new.DEVIATIONSTATE = 0;
new.DEVIATIONDATETIME = current_timestamp;
end
end