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!

CSV - handle comma within quoted string

490959May 13 2008 — edited May 22 2008
I want to create a view based on a CSV clob. i have amended the csv to XML by using a new line character to split the row and use all commas as column seperators . this is fine apart from when there is a comma contained with a quoted string. what i want to know is how would i identify whether the comma was contained within quotes or not? below is a sample of the data i am using. as you can see not all strings are quoted, only those that contain commas.

aaa,bbb,"ccc,ccc"
ddd,"eee,eee",fff
ggg,"hh,hhh","iii,i"

any help would be appreciated
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2008
Added on May 13 2008
5 comments
1,472 views