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 all commas inside double quotes

New RootsMar 9 2017 — edited Mar 14 2017

with t as

  (select '"QZY170309001",2487,"UT",1,"JAJAJ02731","test data, is ,for reference, Nomorevalid..","K","Q"' as str

  from dual

  )

select regexp_replace(str, '("[^",]+),([^"]*")', '\1\2\3' ) from t ;

Hi,

   We have to remove all commas inside double quotes . I have tried above query . it is removing from only first position.

Please let me know how to remove all the comma values

Expected output:

"QZY170309001",2487,"UT",1,"JAJAJ02731","test data is for reference Nomorevalid..","K","Q"

This post has been answered by Frank Kulash on Mar 9 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2017
Added on Mar 9 2017
15 comments
2,377 views