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!

How to remove tabs, multiple spaces, quotes from column data.

Karthik417Mar 22 2014 — edited Mar 23 2014

Hello,

How can we remove tabs, multiple spaces, quotes from column data.

Input:

H     ope you "are" d'oing  w  ell

Output:

H ope you are doing w ell -- There is a tab in Hope and double space in well. This should be replaced by space. (Tab and multi spaces)

I ended up with below:

REGEXP_REPLACE(REGEXP_REPLACE(REPLACE(Col,chr(9),' '), '( ){2,}', ' '),'["'']','')

Can we do it more efficiently, Your inputs are appreciated.

I tried

REGEXP_REPLACE(Col,'[^[a-z,A-Z,0-9,chr(0)-chr(127)[:space:]]]*','')  but tabs still exist and as my data have German characters I cannot go with this.

Thanks

GVK.

This post has been answered by Frank Kulash on Mar 23 2014
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 20 2014
Added on Mar 22 2014
4 comments
2,696 views