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

BEGIN

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

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFSAIDA ADD DhContingencia DATE';

END IF;

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

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFSAIDA ADD JustificativaContingencia VARCHAR2(254)';

END IF;

END;
/*------ ATD 334802 ------*/
DECLARE v_count NUMBER:=0;

BEGIN

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

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFSAIDA ADD DhContingencia DATE';

END IF;

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

IF v_count = 0 THEN

EXECUTE IMMEDIATE 'ALTER TABLE COMPLEMENTONFSAIDA ADD JustificativaContingencia VARCHAR2(254)';

END IF;

END;