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!

RETURN Nth word and Nth character from a string

BeefStuOct 28 2021

I have a query that can get the  Nth word, second word (separated by spaces) 'Two'. How can I get the first character of the Nth word  in my example I want the 'T' from the word 'Two' also to be returned

Select REGEXP_SUBSTR('one Two three four','\w+',1,2) wordN  from dual

Expected output:
Two T
This post has been answered by Frank Kulash on Oct 28 2021
Jump to Answer

Comments

Post Details

Added on Oct 28 2021
4 comments
5,757 views