regexp_split_to_table

From: jo <jose.soares_at_sferacarta.com>
Date: Wed, 23 Jan 2013 07:41:29 +0100
Message-ID: <50FF8619.90508_at_sferacarta.com>



Hi all,

I need to find in Oracle a function similar to Postgres regexp_split_to_table function
to split values from a text column into a list of numeric values as in:  

select * from po;

 id | val

----+----------------------

  1 | 1,2,3,4,5,6,7,8,9,10
(1 row)

select cast(regexp_split_to_table(val, ',') as int) as numbers from po;

       numbers


                     1
                     2
                     3
                     4
                     5
                     6
                     7
                     8
                     9
                    10

(10 rows)

Is there a simple way to do this thing in Oracle? Thanks for any help.
j

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 23 2013 - 07:41:29 CET

Original text of this message