Any delimited file that has delimiters contained within a field is
supposed to use a text qualifier. For CSV, the most common qualifier
is double quotes, so your file would look like:

"1234","field 1","my big field, that has a delimiter or two, but is qualified"

If there are not text qualifiers and a field includes a qualifier then
it isn't a valid csv file. If it is qualified, you should break the
line up using the compound string "," as what you are splitting on,
then remove the first and last qualifiers.

Hope that helps,
Judah

On Thu, Jun 3, 2010 at 10:32 AM,  <p...@smashedvision.com> wrote:
>
> I'm trying to import a comma delimited CSV file using <cfloop
>
> file="filename.csv">, but some records contain commas and they are throwing
>
> everything off. I can't seem to figure out how to replace the in-field
>
> commas without messing up the delimiter. Any ideas? Thanks in advance.
>
>
>
> -Paul
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334273
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to