
/*------ ATD 313087 ------*/
-- Adicionando coluna NSU_ADMINISTRADORA na tabela TRANSACAOCARTAO
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'TRANSACAOCARTAO' AND Upper(column_name) = 'NSU_ADMINISTRADORA'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE TRANSACAOCARTAO ADD NSU_ADMINISTRADORA VARCHAR(30) '; 
END;

-- Adicionando coluna NSU_SITEF na tabela TRANSACAOCARTAO
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'TRANSACAOCARTAO' AND Upper(column_name) = 'NSU_SITEF'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE TRANSACAOCARTAO ADD NSU_SITEF VARCHAR(30) '; 
END;


/*------ ATD 300257 ------*/
DECLARE v_count NUMBER(1) := 0; 

BEGIN 

SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'FORCFFISFAT' AND Upper(column_name) = 'TAMANHORETORNO'; 

EXCEPTION 

WHEN NO_DATA_FOUND THEN 

EXECUTE IMMEDIATE 'ALTER TABLE FORCFFISFAT ADD TAMANHORETORNO NUMERIC(15) default 0 not null '; 

END;





DECLARE v_count NUMBER(1) := 0; 

BEGIN 

SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'FORCFNFFAT' AND Upper(column_name) = 'TAMANHORETORNO'; 

EXCEPTION 

WHEN NO_DATA_FOUND THEN 

EXECUTE IMMEDIATE 'ALTER TABLE FORCFNFFAT ADD TAMANHORETORNO NUMERIC(15) default 0 not null '; 

END;

