
/*------ ATD 345255 ------*/
-- Cria o campo "VlrFreteItem" na tabela CadItemAtF
-- Oracle
DECLARE v_count NUMBER:=0;
BEGIN
SELECT Count(1) INTO v_count FROM USER_TAB_COLUMNS WHERE UPPER(table_name) = 'CADITEMATF' AND Upper(COLUMN_NAME) = 'VLRFRETEITEM';
IF v_count = 0 THEN
EXECUTE IMMEDIATE 'ALTER TABLE CadItemAtF ADD VlrFreteItem NUMERIC(10,2) DEFAULT 0 NOT NULL';
END IF;
END;