wilian 2017-09-22 00:29:43 +00:00
parent 216b4be724
commit a5b02e2e82
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE MOTIVO_CANCELACION ADD( CVESISTEMA VARCHAR2(30))';
execute immediate 'alter table MOTIVO_CANCELACION add constraint mc_uniq_cvesistema unique("CVESISTEMA")';
exception when column_exists then null;
end;
/
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
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 dup_val_on_index then null;
end;