
/*------ ATD 256407 ------*/
DECLARE v_count NUMBER(1) := 0;
BEGIN
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE upper(table_name) = 'BASECALFAT' AND upper(column_name) = 'ALQDEBICMSST';
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXECUTE IMMEDIATE 'alter table BaseCalFat add ALQDebICMSST Decimal(6,2) default 0';
END;
/
DECLARE v_count NUMBER(1) := 0;
BEGIN
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE upper(table_name) = 'BASECALFAT' AND upper(column_name) = 'ALQCREDICMSST';
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXECUTE IMMEDIATE 'ALTER TABLE BASECALFAT ADD ALQCREDICMSST DECIMAL(6,2) default 0 ';
END;
/
DECLARE v_count NUMBER(1) := 0;
BEGIN
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE upper(table_name) = 'BASECALFAT' AND upper(column_name) = 'BASECREDICMSST';
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXECUTE IMMEDIATE 'alter table BaseCalFat ADD BaseCredICMSST Decimal(8,4) default 0 ';
END;
/
DECLARE v_count NUMBER(1) := 0;
BEGIN
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE upper(table_name) = 'BASECALFAT' AND upper(column_name) = 'BASEDEBICMSST';
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXECUTE IMMEDIATE 'alter table BaseCalFat ADD BaseDebICMSST Decimal(8,4) default 0 ';
END;
/
DECLARE v_count NUMBER(1) := 0;
BEGIN
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE upper(table_name) = 'BASECALFAT' AND upper(column_name) = 'MANTERBASEPADRAOREDUCAO';
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXECUTE IMMEDIATE 'alter table BaseCalFat add ManterBasePadraoReducao char(1) default '' '' ';
END;
/
COMMIT;