Comma Separated values in Oracle

后端 未结 5 1110
北海茫月
北海茫月 2020-12-18 14:44

I have a column with comma separated values like 6,7,99.3334.

I need write a PL SQL procedure that will give me these values separately. The Length of t

5条回答
  •  北海茫月
    2020-12-18 14:58

    Something like this maybe?

    with my as (
      select '6,7,99.3334' str
        from dual
    )
    select 
      regexp_substr(my.str,'[^,]+',1,level) part
    from my
    connect by level <= length(regexp_replace(my.str,'[^,]+')) + 1
    ;
    

提交回复
热议问题