Описание
(Нет описания для триггера IT_SetSamplerTimeForRRW)
Определение
CREATE TRIGGER "IT_SetSamplerTimeForRRW" FOR IT
ACTIVE BEFORE INSERT OR UPDATE POSITION 10
AS
declare variable operationSuptype integer;
begin /*
if (new.transporttypeid = 2) then
begin
$$IB$$*/ /* select operation.operationsubtype
from operation where operationid = new.operationid
into operationSuptype;
if (operationSuptype = 0) then
begin
new.samplerindate = new.grosstime;
new.sampleroutdate = new.taretime;
if (new.samplerindate is null) then
new.samplerindate = current_date;
end
else
begin
new.samplerindate = new.taretime;
new.sampleroutdate = new.grosstime;
if (new.samplerindate is null) then
new.samplerindate = current_date;
new.regdate = new.samplerindate;
end*/ /*$$IB$$
end
else
begin
if (
-- (new.transporttypeid is null or new.transporttypeid <> 2) and
new.samplerindate is null
)
then new.samplerindate = new.regdate;
end
*/ POST_EVENT '$$IBE$$';
END