36 lines
1.2 KiB
MySQL
36 lines
1.2 KiB
MySQL
declare
|
|
column_exists exception;
|
|
pragma exception_init (column_exists , -01430);
|
|
begin
|
|
execute immediate 'ALTER TABLE MOTIVO_CANCELACION ADD( CVESISTEMA VARCHAR2(30))';
|
|
exception when column_exists then null;
|
|
end;
|
|
/
|
|
declare
|
|
object_exists exception;
|
|
except_02275 exception;
|
|
except_02270 exception;
|
|
except_02261 exception;
|
|
|
|
pragma exception_init (object_exists , -01430);
|
|
pragma exception_init (except_02275 , -02275);
|
|
pragma exception_init (except_02270 , -02270);
|
|
pragma exception_init (except_02261 , -02261);
|
|
begin
|
|
execute immediate 'alter table MOTIVO_CANCELACION add constraint mc_uniq_cvesistema unique("CVESISTEMA")';
|
|
|
|
exception
|
|
when object_exists then null;
|
|
when except_02275 then null;
|
|
when except_02270 then null;
|
|
when except_02261 then null;
|
|
end;
|
|
/
|
|
declare
|
|
begin
|
|
execute immediate 'alter session set nls_numeric_characters = '',.'' ';
|
|
execute immediate 'Insert into MOTIVO_CANCELACION (MOTIVOCANCELACION_ID,DESCMOTIVO,TIPOMOTIVO,ACTIVO,FECMODIF,USUARIO_ID,CVESISTEMA)
|
|
values (MOTIVO_CANCELACION_SEQ.nextval,''CANCELAMENTO ECF'',''B'',1,sysdate,1,''CANCELAMENTO_ECF'')';
|
|
exception when others then null;
|
|
end;
|