MySQL Forums
Forum List  »  Newbie

Error "row xxxx doesn't contain data for all columns"
Posted by: Gary Nall
Date: August 15, 2015 10:57AM

Newbie might be an understatement for me. I've had MySQL for just a few days!

I'm trying to import a large csv file using the following statement:

LOAD DATA INFILE 'C:/Order_Download/orderdetail.csv'
INTO TABLE data
FIELDS terminated by ','
ENCLOSED BY '"'
LINES TERMINATED by'\n'
IGNORE 1 ROWS;

I'm getting this error: "Error Code: 1261. Row 2010 doesn't contain data for all columns"

Only one field ('ORDER')in my table is set as Not Null, which is my primary key. All others have the Default of NULL.

I've looked at the row in the csv file. It doesn't seem to be missing data and certainly isn't missing data in the Order field. So I'm at a loss for understanding why I'm getting this error.

Any ideas?

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.