ALTER TRIGGER "tib_ea_col_def" before insert order 1 on
dba.ea_col_def
referencing new as new_name
for each row
begin
  declare id1 integer;
  if(new_name.id is null) or(new_name.id = 0) then
    select getid_ea_col_def() into id1 from DUMMY;
    set new_name.id = id1
  end if;
  if(new_name."jrknr" is null) or(new_name."jrknr" = 0) then
    select getid_ea_col_def_jrknr(*) into id1 from DUMMY;
    set new_name."jrknr"=id1
  end if
end