tags:

views:

159

answers:

2

Hi Experts, I am having an issue with importing a large(60MB) CSV file in MYSQL DB. The problem arises when an address field has multiple comma seperated values e.g. home no, street no, town etc.

I tried to use BigDump for it but, the problem did not solved because of a single field containing multiple comma separated values.

Any idea, suggestion or solution from experts how to handle it? Please reply, because I am sick of it.

Thanks

A: 

Is the address enclosed in double-quotes? Like:

Name,Address,Email
John Smith,"123 Elm Street,New York,NY",[email protected]

If it's not enclosed in double-quotes but contains commas, it's not a valid CSV file.

Chad Birch
I am watching this file in excel and it is not enclosed in any double-quotes.
kakaajee
Looking at it in excel isn't ideal, open it in a text editor. Edit a few lines into your question, it's hard to help without knowing exactly what you're looking at.
Chad Birch
Thanks for your reply.I have looked at it in notepad and this address values are enclosed in double-quotes, just like the example you have provided.
kakaajee
A: 

Have you tried using LOAD DATA INFILE statement. It allows you to carefully control the CSV dialect.

newtover