1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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 |