
CREATE OR ALTER trigger ttbperfil_b01iu for tbperfil
active before insert or update position 0
AS
begin
  if(new.id <> old.id and new.id <> ' ')then
  begin
     new.id = trim(new.id);
  end
end;

COMMENT ON TRIGGER TTBPERFIL_B01IU IS 'trim perfil';

CREATE OR ALTER trigger ttbmodelo_bloqueio_b01iu for tbmodelo_bloqueio
active before insert or update position 0
AS
begin
  if(new.perfil <> old.perfil and new.perfil <> ' ')then
  begin
     new.perfil = trim(new.perfil);
  end
end;

COMMENT ON TRIGGER ttbregra_calculo_custo_b01iu IS 'trim perfil';

CREATE OR ALTER trigger ttbregra_calculo_custo_b01iu for tbregra_calculo_custo
active before insert or update position 0
AS
begin
  if(new.perfil_up <> old.perfil_up and new.perfil_up <> ' ')then
  begin
     new.perfil_up = trim(new.perfil_up);
  end
end;

COMMENT ON TRIGGER ttbmodelo_bloqueio_b01iu IS 'trim perfil';

CREATE OR ALTER trigger ttbsub_up_b01iu for tbsub_up
active before insert or update position 0
AS
begin
  if(new.perfil_sku <> old.perfil_sku and new.perfil_sku <> ' ')then
  begin
     new.perfil_sku = trim(new.perfil_sku);
  end
end;

COMMENT ON TRIGGER ttbsub_up_b01iu IS 'trim perfil';

