
/*------ ATD 341655 ------*/
/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTOPRODUTO' AND Upper(column_name) = 'pGLP'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTOPRODUTO ADD pGLP NUMERIC (5,2) '; 
END;
/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTOPRODUTO' AND Upper(column_name) = 'pGNN'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTOPRODUTO ADD pGNN NUMERIC (5,2) '; 
END;
/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTOPRODUTO' AND Upper(column_name) = 'pGNI'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTOPRODUTO ADD pGNI NUMERIC (5,2) '; 
END;
/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'COMPLEMENTOPRODUTO' AND Upper(column_name) = 'VPARTIDA'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTOPRODUTO ADD VPARTIDA NUMERIC (5,2) '; 
END;
/

DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'DADOSITEMNFE' AND Upper(column_name) = 'pGLP'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE DADOSITEMNFE ADD pGLP NUMERIC (5,2) '; 
END;
/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'DADOSITEMNFE' AND Upper(column_name) = 'pGNN'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE DADOSITEMNFE ADD pGNN NUMERIC (5,2) '; 
END;
/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'DADOSITEMNFE' AND Upper(column_name) = 'pGNI'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE DADOSITEMNFE ADD pGNI NUMERIC (5,2) '; 
END;
/
DECLARE v_count NUMBER(1) := 0; 
BEGIN 
SELECT 1 INTO v_count FROM USER_TAB_COLUMNS WHERE Upper(table_name) = 'DADOSITEMNFE' AND Upper(column_name) = 'vPart'; 
EXCEPTION 
WHEN NO_DATA_FOUND THEN 
EXECUTE IMMEDIATE 'ALTER TABLE DADOSITEMNFE ADD vPart NUMERIC (15,2) '; 
END;
/