CONNECT BY LEVEL <= length(wdata) - length(REPLACE(wdata, '|')) - 1
by 제로
[2012.03.09 11:31:36]
with t as (select '20110308' col_1, '김정무,정신화' col_2 from dual union all select '20110330', '양준혁,양정환,김수영' from dual union all select '20110405', '김현지,김주현,강윤아' from dual ) select col_1 , col_2 from (select col_1 , regexp_substr(col_2, '[^,]+', 1, lv) as col_2 from t, (select level lv from dual connect by level <= (select max(length(col_2) - length(replace(col_2, ',')))+1 cnt from t))) where col_2 is not null order by 1 ;
by 강동현
[2012.03.13 10:30:13]
와우... 멋지십니다.... 짝짝짝 ^^... 공부를 많이 해야겠군요.
by 강동현
[2012.03.13 10:30:20]
와우... 멋지십니다.... 짝짝짝 ^^... 공부를 많이 해야겠군요.
댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.