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