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!

Remove first word of a line based on delimiter

2950986May 15 2015 — edited May 15 2015

Hello,

I have data like this in a column:

Word1 Word2 Word3

Word1
Word1, Word2

And I want the select statement to return the line without first word OR keep it as is if there's only one word in a line. Like:

Word2 Word3

Word1
Word2

So I'm thinking that we look into the line "return all data after , or SPACE" and "leave it as is if there's only one word" (should be so that there's no empty space after the only word).

Is it possible to do something like this with one select query? What would be a good solution?

This post has been answered by BluShadow on May 15 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2015
Added on May 15 2015
5 comments
1,877 views