String val = "ABC,abc|DEF,def|GHI,g hi|JKL,jkl";
How to split this string and insert into tables using sql, pl/sql or whatever.
,
is column delimiter and |
is row delimiter.
is it possible?
[expected result]
col1 col2
------------
ABC abc
DEF def
GHI g hi
JKL jkl
Addition Question
Thanks reply. I have a another question.
this is a string.
String val = "ABC,abc||D|@EF,def||G|HI,g hi||JKL,jkl";
I want to split by only ||
delimiter. how to use the RegExp?
I try it such as '[^|]{2}+'
, '^[|]{2}+', 1,
etc..
this is my wrong result.
[wrong result]
COL1 COL2
---------- ----------
BC abc
D
@EF def
G
HI g hi
JKL jkl
[expected result]
col1 col2
-----------
ABC abc
D|@EF def
G|HI g hi
JKL jkl