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!

replace multiple space characters with a single space

Rob JonesMay 20 2013 — edited May 20 2013
Hi,
Oracle 11g R2.

Looking for a way to replace multiple space characters in a row with a single space. For example, the text "abc abc" should look like "abc abc". I tried toying with replace, but it only works for the case of 2 spaces. Need a solution for the cases where there could be 2 or more spaces.
select replace(column1, chr(32)||chr(32), chr(32)) from tablea
This post has been answered by Solomon Yakobson on May 20 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2013
Added on May 20 2013
3 comments
650 views