Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with REGEXP_SUBSTR

1039665Sep 11 2013 — edited Sep 12 2013

Hello,

I'm trying to use the regexp_substr function in Oracle 10 to split a string into several lines (semicolon is the delimiter).

So I'm using:

Select Site_List, trim(regexp_substr(Site_List, '[^;]+, 1, level)) FROM (Select Site_List FROM ALL_SITES) Connect by trim(regexp_substr(Site_List, '[^;]+, 1, level)) is not null

When I run this in SQL Developer, it's working (in a few seconds, but SQL Developer only shows the 50 first results).

Now, if I try to use a count(*) on this or to insert the query result in a table, it takes forever (I have only 375 lines in ALL_SITES table).

Is there something I did wrong ?

Thanks for your help.

This post has been answered by BluShadow on Sep 11 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 10 2013
Added on Sep 11 2013
14 comments
3,319 views