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!

REGULAR EXPRESSION - Split names.

user13117585Mar 24 2015 — edited Mar 26 2015

Hello guys,

I have a question about regular expressions. Here are a few names:

WITH T AS

(

SELECT 'Bill CLINTON' as name FROM dual UNION ALL

SELECT 'Christiano RONALDO' FROM dual UNION ALL

SELECT 'Barack Hussein OBAMA' FROM dual UNION ALL

SELECT 'JUAN JOSE Miguel Ange' FROM dual UNION ALL

SELECT 'Miguel Ange JUAN JOSE' FROM dual UNION ALL

SELECT 'RONALDO Christiano' FROM dual

)

SELECT name

  FROM t;

 

 

I want to split this string. I want something like this

RESULT:

Bill           CLINTON

Christiano     RONALDO

Barack Hussein OBAMA

Miguel Ange    JUAN JOSE

Miguel Ange    JUAN JOSE

Christiano     RONALDO

Is this possible? Any idea?

Thanks guys

This post has been answered by odie_63 on Mar 24 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2015
Added on Mar 24 2015
12 comments
2,959 views