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!

Triming leading and trailing characters till a special character in SQL

Rajneesh S-OracleJan 31 2020 — edited Jan 31 2020

Hello All,

I want to trim from right and left till a special character.

For example column_name ='ABC_XYZ_PQR_EFG'

I want to return 'XYZ_PQR' through substr/ltrim/rtrim/trim.

if column_name ='ABCD_EFG_X'

then result: EFG

Any suggestion?

Thanks,

Rajneesh

This post has been answered by Frank Kulash on Jan 31 2020
Jump to Answer
Comments
Post Details
Added on Jan 31 2020
9 comments
747 views