
/*------ ATD 356691 ------*/
DECLARE v_count NUMBER(1) := 0;
BEGIN
SELECT COUNT(*) INTO v_count FROM USER_INDEXES WHERE table_name = 'CONTROLESEPARACAOEXPRESSA' AND INDEX_NAME = 'IDX_CONTROLESEPARACAOEXPRESSA1';
IF v_count=0 THEN
EXECUTE IMMEDIATE 'CREATE INDEX IDX_CONTROLESEPARACAOEXPRESSA1 ON CONTROLESEPARACAOEXPRESSA(NUMPED)';
END IF;
END;

DECLARE v_count NUMBER(1) := 0;
BEGIN
SELECT COUNT(*) INTO v_count FROM USER_INDEXES WHERE table_name = 'CONTROLESEPARACAOEXPRESSA' AND INDEX_NAME = 'IDX_CONTROLESEPARACAOEXPRESSA2';
IF v_count=0 THEN
EXECUTE IMMEDIATE 'CREATE INDEX IDX_CONTROLESEPARACAOEXPRESSA2 ON CONTROLESEPARACAOEXPRESSA(NUMEROLISTA)';
END IF;
END;