CREATE TRIGGER ORDER_AD0 FOR ORDER_ ACTIVE BEFORE DELETE POSITION AS d

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
CREATE TRIGGER ORDER_AD0 FOR ORDER_
ACTIVE BEFORE DELETE POSITION 0
AS
declare variable x integer;
begin
/* Trigger text */
if (order_.state = 1) then
insert into arhive values (gen_id(generator_archive,1),
order_.date_start, order_.date_end,
order_.date_real_end, order_.nomer_zakaza);
end