List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 31 2001 9:13pm
Subject:Re: Load data infile
View as plain text  
At 10:32 AM -0500 10/31/01, <sql@stripped> wrote:
>Hi
>
>I'm working on importing csv datafile returns Warnings, after carefully
>checking data I noticed that there are double quotes (") inside the
>records.
>
>mysql> LOAD DATA INFILE '/home/sql/data.csv' INTO TABLE csvdata
>FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n';
>Query OK, 20000 rows affected (1.58 sec)
>Records: 20000  Deleted: 0  Skipped: 0  Warnings: 572
>
>Example of line that fails:
>"data","data","some "text" and" text"\n
>
>Any quick solutions, regarding mysql import?

It's not surprising that it fails.  It's not valid CSV.


>
>Thanks
>
>sql,table,database,query,mysql
Thread
Load data infilesql31 Oct
  • Re: Load data infilesql31 Oct
    • RE: Load data infileJoe Kaiping31 Oct
RE: Load data infileRick Emery31 Oct
Re: Load data infilePaul DuBois31 Oct
Re: Load data infilePaul DuBois31 Oct