Tim,

I was recently dealing with this kind of a problem. Take a look:

http://www.bennadel.com/index.cfm?dax=blog:498.view

This UDF, "CSVToArray()" can handle embedded line breaks, commas, and
quotes and returns an Array of Arrays.

I am not sure if you can pull these values out before you parse. I had
to end up parsing everything.

......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Tim Stutzman [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 26, 2007 4:37 PM
To: CF-Talk
Subject: Reading CSV File

Hello,

I am reading a CSV file and inserting it into a database.  All is good
with the exception that one field has commas within it, therefore when
it runs, it thinks the commas inside the "" are delimeters also.  Any
ideas on how I can get around it or take the commas out of that field
before I start processing the CSV file? The commas in the field are not
necessary. For example in my code below the varible Description may have
several commas in it when I am trying to insert it into the database,
therefore creating a insertion error.

Thanks in advanced. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270714
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to