Column to Rows - Number Separated By Any Character

Value: '374627467(92876/5674)988276+87234687/8974232*3746-984027374[32742-3746236'

Expected Output:
VALUE
------------
374627467
92876
5674
988276
87234687
8974232
3746
984027374
32742
3746236


with t as (
select '374627467(92876/5674)988276+87234687/8974232*3746-984027374[32742-3746236' x from dual
)
select
    substr(   
        ','||x,regexp_instr(','||x,'[^[:digit:]]',1,level)+1,
        regexp_instr(x||',','[^[:digit:]]',1,level) - regexp_instr(','||x,'[^[:digit:]]',1,level)
    ) value
from
    t connect by level <= length(x) - length(regexp_replace(x,'\D')) + 1;
   

Related Links
- Function to Compare two Comma Separated Strings in Oracle
- Oracle: Comma Separated String To Rows 10g Onwards
- Oracle: Comma Separated String To Rows 11g
- Oracle: Nth Record from Comma Separated String
- Oracle: Comma Separated String To Rows

No comments:

Post a Comment