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!

Split string into rows based on space

spur230Jul 1 2014 — edited Jul 2 2014

I am using Oracle 11.2.0.3.  I need fastest way  to split organization names  base on space possible just using SQL.

   with org as

    (

    select 1 org_pk , 'ALL american  ,INC' org_nm from dual union all

     select 2 org_pk , 'A.G  COMPANY' org_nm from dual union all

     select 3 org_pk, 'GROWTH FUND SPONSORS and SONS, INC.' org_nm from dual

)

select * from org  ;

Result I need is

1   ALL

1   american

1  ,INC

2  A.G

2 COMPANY

3 GROWTH

3 FUND

3 SPONSORS

3 and

3 SONS,

3 INC.

Many thanks.

This post has been answered by Solomon Yakobson on Jul 2 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2014
Added on Jul 1 2014
8 comments
4,277 views