SET TERM ^ ;

create trigger ttbsped_contribuicao_b01i for tbsped_contribuicao
active before insert position 0
as
begin
  if (new.id is null) then
    new.id = gen_id(GTBSPED_CONTRIBUICAO,1);
end
^

SET TERM ; ^

