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!

Parsing Suffix from a Name

896983Apr 11 2012 — edited Apr 13 2012
Hi All,

I want to parse a Name with patterns

You can see the patterns in Name Column. I want the Middle Name has null which has suffix ('JR','SR','II','III','IV','VI','VII','VIII','IX')

<font color="red"> No need to consider after 'AND' / '&' name </font>

Current Table contains in this Format (All Middle_name has Suffix)
Name                              First_name      Middle_name      Last_name
AGLIARDI SR THERESA	                  AGLIARDI	SR	THERESA
ANNE SR SLATON	                                 ANNE	SR	SLATON
ANDREW III UPHOLSTERY & SLIPCOVER	     ANDREW	III	UPHOLSTERY
ANGELOZZI JR ORPALT AND CLESTON	         ANGELOZZI	JR	ORPALT
Help me guys.......Thanks a lot

Require Table output to be updated as
Name                              First_name      Middle_name      Last_name
AGLIARDI SR THERESA	                  AGLIARDI	null	THERESA
ANNE SR SLATON	                                 ANNE	NULL	SLATON
ANDREW III UPHOLSTERY & SLIPCOVER	     ANDREW	NULL	UPHOLSTERY
ANGELOZZI JR ORPALT AND CLESTON	         ANGELOZZI	NULL	ORPALT
Edited by: Krux_rap on Apr 11, 2012 7:56 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2012
Added on Apr 11 2012
9 comments
1,093 views