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