Problem with "LOAD DATA INFILE"

wxdqz

New Member
Hi,

I'm having a problem with loading data from CSV into a simple table.

The "Areas" table structure is:

id: smallint(6) identity
Area: text

The csv file is of the form:

"Area"
"East Midlands"
"North England"
"South East England"
"N. Ireland"

And the load command is:

LOAD DATA INFILE "Areas.csv" INTO TABLE Areas FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r' IGNORE 1 LINES (Area);

This seems to load te data into the table, however, the Area column entries contain the '"' delimeters - not having them stripped off.

Any ideas why this might be happening?

Many thanks
 
Back
Top