I have a ["1101124","1101123","123456"]
, I need to get the end result as rows for the numbers which are in the bracket.
How can I achieve this by using regular expression in Oracle.
Asked
Active
Viewed 209 times
0
2 Answers
0
If ["1101124","1101123","123456"]
is a string:
SQL> WITH DATA AS
2 ( SELECT '["1101124","1101123","123456"]' str FROM dual
3 )
4 SELECT trim(regexp_substr(str, '[0-9]+', 1, LEVEL)) str
5 FROM DATA
6 CONNECT BY regexp_substr(str , '[0-9]+', 1, LEVEL) IS NOT NULL
7 /
STR
----------------------------------------
1101124
1101123
123456
3 rows selected.
SQL>

logi-kal
- 7,107
- 6
- 31
- 43