Oracle处理指定分隔符中的字符串
Oracle处理指定分隔符中的字符串DECLAREV_LENGTH NUMBER;V_TMP VARCHAR2(10);V_STR VARCHAR2(20) := '12;6;2;5;3';BEGINV_LENGTH := LENGTH(V_STR) - LENGTH(REPLACE(V_STR, ';', '')) + 1;FOR i IN 1..V_LENGTH LOOPSELECT REGEXP_SUBSTR(V_STR, '[^;]+', 1, i) INTO V_TMP FROM DUAL;DBMS_OUTPUT.put_line(V_TMP);END LOOP;END;/