ALTER TRIGGER "tib_skoobid" before insert order 1 on
DBA.skoobid
referencing new as new_name
for each row
begin
  declare id1 integer;
  if(new_name.skoop is null) or(new_name.skoop = 0) then
    select getid_skoobid() into id1 from DUMMY;
    set new_name.skoop = id1
  end if;
  set new_name.kood=trim(new_name.kood)
end