
/*------ ATD 280464 ------*/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTONFENTRA' AND Upper(column_name) = 'COD_INF_COMPL'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFENTRA ADD COD_INF_COMPL CHAR(06) NULL'; 
END;

DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTONFSAIDA' AND Upper(column_name) = 'COD_INF_COMPL'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFSAIDA ADD COD_INF_COMPL CHAR(06) NULL'; 
END;

DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTONFENTRA' AND Upper(column_name) = 'DES_INF_COMPL'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFENTRA ADD DES_INF_COMPL VARCHAR(254) NULL'; 
END;

DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTONFSAIDA' AND Upper(column_name) = 'DES_INF_COMPL'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFSAIDA ADD DES_INF_COMPL VARCHAR(254) NULL'; 
END;
