List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 22 2002 7:43pm
Subject:Re: MySQL Load Data Infile
View as plain text  
At 13:13 -0600 2/22/02, Craig Westerman wrote:
>I have a table that has following fields
>id (auto increment)
>When I try to LOAD DATA INFILE with this file using comma as field delimiter
>and newline as end of row

You need to add the column list:

... INTO TABLE tbl_name
(date, appleprice, orangeprice, pearprice)

Otherwise, LOAD DATA has no idea the id column is not present in the
data file.

>it only writes to one row in the table and seems to be adding the id fields
>and date fields. pearprice field is empty. This is result of the one row
>id       date       appleprice orangeprice pearprice
>127   2028-01-08       5.27     430.05
>Is my data formated incorrectly? Help!
>Can someone please show me example of their mysql data in a working
>Thanks Craig

MySQL Load Data InfileCraig Westerman22 Feb
  • Re: MySQL Load Data InfileMichael Stassen22 Feb
  • Re: MySQL Load Data InfilePaul DuBois22 Feb