
/*------ ATD 459045 ------*/
DECLARE v_count NUMBER:=0;

BEGIN

SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'ITEMFATURADO' and UPPER(column_name) = 'NUMEROPEDIDOAGRUPADORWMS';

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE ITEMFATURADO ADD NumeroPedidoAgrupadorWMS INT NULL';

END IF;

END;
/