1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
CREATE TRIGGER IBE$CMDCLI_AD FOR CMDCLI
ACTIVE AFTER DELETE POSITION 32767
as
declare variable tid integer;
begin
tid = gen_id(ibe$log_tables_gen,1);
insert into ibe$log_tables (id, table_name, operation, date_time, user_name)
values (:tid, 'CMDCLI', 'D', 'NOW', user);
insert into ibe$log_keys (log_tables_id, key_field, key_value)
values (:tid, 'CF', old.cf);
insert into ibe$log_fields (log_tables_id, field_name, old_value, new_value)
values (:tid, 'CF', old.cf, null);
insert into ibe$log_fields (log_tables_id, field_name, old_value, new_value)
values (:tid, 'LIB', old.lib, null);
end |
Partager