create or replace procedure test
(
jf_Id in nvarchar2,
yf_id in nvarchar2
)
as
v_length NUMBER := LENGTH(yf_id);
v_start NUMBER := 1;
v_index NUMBER;
Begin
WHILE(v_start <= v_length)
LOOP
v_index := INSTR(yf_id, ',', v_start);
IF v_index = 0
THEN
dbms_output.put_line(SUBSTR(yf_id, v_start));
v_start := v_length + 1;
ELSE
dbms_output.put_line(SUBSTR(yf_id, v_start, v_index - v_start));
v_start := v_index + 1;
END IF;
END LOOP;
Exception
When others then
Rollback;
End;