declare
  dup_val_on_index  exception;
  except_02291  exception;
  pragma exception_init (dup_val_on_index  , -00001);
  pragma exception_init (except_02291  , -02291);
begin
  execute immediate 'UPDATE PERFIL_FUNCION SET ACTIVO = 0 where FUNCIONSISTEMA_ID in ( SELECT FUNCIONSISTEMA_ID FROM FUNCION_SISTEMA where DESCRUTA like ''%MOVIMENTACIONBILHETES%'' )';
  exception 
    when dup_val_on_index  then null;
    when except_02291  then null;
end;
/
--LIMPA O COLUNA
declare
  dup_val_on_index  exception;
  except_02291  exception;
  pragma exception_init (dup_val_on_index  , -00001);
  pragma exception_init (except_02291  , -02291);
begin
  execute immediate 'UPDATE FUNCION_SISTEMA SET ACTIVO = 0 where DESCRUTA like ''%MOVIMENTACIONBILHETES%'' ';
  exception 
    when dup_val_on_index  then null;
    when except_02291  then null;
end;

