|
Posted by j_macaroni on 11/19/78 11:45
I didnt try this but its someones example in the online docs file.
LOAD DATA INFILE "filename.csv" INTO TABLE your_table FIELDS TERMINATED
BY "," OPTIONALLY ENCLOSED BY """" LINES TERMINATED BY "\\r\\n";
GregoryD wrote:
> I have a flat file that I'm trying to stick into a MySQL database. One
> record per line, multiple fields per record, and many of them are null
> fields which are just double quotes without a space between. It's probably
> nothing really major for people who have done this before, but I'm a bit
> stumped. The file is comma delimited. Every field is surrounded by double
> quotes. I've done quite a bit of searching, on the php site and elsewhere,
> but I can't seem to get it to strip the quotes out so I can explode the file
> line by line to grab the fields. Anyone have a quick solution?
>
> GregoryD
[Back to original message]
|