
/*------ ATD 233084 ------*/
-- Adicionando coluna DESCICMSSUFRAMA na tabela ITNFSAICOMPLEMENTO
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'ITNFSAICOMPLEMENTO' AND Upper(column_name) = 'DESCICMSSUFRAMA'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE ITNFSAICOMPLEMENTO ADD DESCICMSSUFRAMA NUMERIC(15,2) default 0 not null '; 
END;

-- Adicionando coluna DESCICMSSUFRAMA na tabela ITEMCLICOMPLEMENTO
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'ITEMCLICOMPLEMENTO' AND Upper(column_name) = 'DESCICMSSUFRAMA'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE ITEMCLICOMPLEMENTO ADD DESCICMSSUFRAMA NUMERIC(15,2) default 0 not null '; 
END;
