
/*------ ATD 300890 ------*/
DECLARE v_count NUMBER:=0;

BEGIN

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'ITNFSAICOMPLEMENTO' and UPPER(column_name) = 'VALORDESCONTOPISCOFINS';

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE ITNFSAICOMPLEMENTO ADD VALORDESCONTOPISCOFINS NUMBER(15,2) NULL';

END IF;

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'ITNFSAICOMPLEMENTO' and UPPER(column_name) = 'VALORDESCONTOICMS';

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE ITNFSAICOMPLEMENTO ADD VALORDESCONTOICMS NUMBER(15,2) NULL';

END IF;

END;
/*------ ATD 344603 ------*/
DECLARE v_count NUMBER:=0;

BEGIN

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'COMPLEMENTONFENTRA' and UPPER(column_name) = 'VFCPST';

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFENTRA ADD VFCPST NUMBER(15,2) NULL';

END IF;