with t(gb, txt) as
(select '1',
'a
b
c' from dual union all
select '2',
'a
b
c' from dual
)
select gb, regexp_substr(replace(txt,chr(10),'^'),'[^^]+',1,lv) txt
from t
,(select level lv from dual connect by level <= 50)--개행 50번까지만
where regexp_count(txt,chr(10)) >= lv - 1
order by gb, txt
댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.