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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Splitting a Comma separated line

454278Jun 29 2007 — edited Sep 28 2007
Hi,

We have a comma separated text file, that we need to read in PL/SQL. Does anyone know of a quick and clean method to split the line into its components?

For example, for a line : 5/10/2007,36352737,"Ronald M. Reed, Jr.",211001,7204,-75.00
I should fetch 6 values:
5/10/2007
36352737
Ronald M. Reed, Jr
211001
7204
-75.00

I can use a combination of Substr and instr, but the problem comes when we have a ',' in the content of some field. How do we ignore that?

Any help would be greatly appreciated.

Thanks
Ashish

Comments

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

Post Details

Locked on Oct 26 2007
Added on Jun 29 2007
17 comments
4,904 views