"localhost:/firebird/data/ILICHEVSK2.FDB". Триггеры Previous topic Chapter index Next topic

DEVIATION_SETDATE

 

Описание

Установка даты возникновения отклонения

 

Определение

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

 

     Previous topic Chapter index Next topic