DECLARE
TYPE TYPE_ARRAY IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
KEYS TYPE_ARRAY;
VALS TYPE_ARRAY;
I INTEGER := 0;
P_PARAM VARCHAR2(256) := '&apprv_docno=AP1505290001&apprv_docno=AP1505290002';
V_APPRV_DOCNO VARCHAR2(32);
BEGIN
LOOP
I := I + 1;
SELECT REGEXP_SUBSTR(REGEXP_SUBSTR(P_PARAM, '[^&]+', 1, I), '[^=]+', 1, 1)
, REGEXP_SUBSTR(REGEXP_SUBSTR(P_PARAM, '[^&]+', 1, I), '[^=]+', 1, 2)
INTO KEYS(I)
, VALS(I)
FROM DUAL;
EXIT WHEN KEYS(I) IS NULL;
DBMS_OUTPUT.PUT_LINE(KEYS(I) || ' = ' || VALS(I));
END LOOP;
END;
-----------------------------------------------------------------------------
apprv_docno = AP1505290001
apprv_docno = AP1505290002