
/*------ ATD 331377 ------*/
-- Oracle
-- Adiciona a coluna xNEmp na tabela DadosItemNFE
DECLARE v_count NUMBER:=0;
BEGIN
SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'DADOSITEMNFE' and UPPER(column_name) = 'XNEMP';
IF v_count = 0 THEN
EXECUTE IMMEDIATE 'ALTER TABLE DADOSITEMNFE ADD XNEMP VARCHAR2(40)';
END IF;
END;