21 lines
629 B
SQL
21 lines
629 B
SQL
declare
|
|
column_exists exception;
|
|
pragma exception_init (column_exists , -01430);
|
|
begin
|
|
execute immediate 'ALTER TABLE TIPO_EVENTO_EXTRA add INDENVIAEXCESSODEBAGAGEMSEFAZ NUMBER(1,0)';
|
|
exception when column_exists then null;
|
|
end;
|
|
/
|
|
|
|
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 TIPO_EVENTO_EXTRA SET INDENVIAEXCESSODEBAGAGEMSEFAZ=1 WHERE CVETIPOEVENTO=''EXCESSO_BAGAGEM'' AND INDENVIAEXCESSODEBAGAGEMSEFAZ IS NULL';
|
|
exception when others then null;
|
|
end;
|
|
/
|