MySQL Forums
Forum List  »  Newbie

Re: Error "row xxxx doesn't contain data for all columns"
Posted by: Gary Nall
Date: August 18, 2015 01:59PM

Thank You for the suggestions. I've followed through on most of them which you can see in the Show Create TAble results pasted below.
1. I replaced all spaces in the column names with underscores.
2. I changed the data type from TEXT to VARCHAR for all fields that have a name (i.e. Bill To Name, City, State, etc).
3. I did not create child tables.

I ran the LOAD DATA INFILE script again and got the same Error Code stating Row 2010 doesn't contain data for all columns.

Based on your previous observation regarding the 2 rows after 2010, I deleted them, along with the next 8 rows for good measure.

The data loaded successfully! My question is this. Is there a way to write the script so that when this error occurs skip the record and continue loading the following records?


data CREATE TABLE `data` (
`Bill-to_Code` int(11) DEFAULT NULL,
`Bill-to_Name` varchar(30) DEFAULT NULL,
`Bill-to_City` varchar(29) DEFAULT NULL,
`Bill-to_State` char(2) DEFAULT NULL,
`Bill-to_Zip` int(11) DEFAULT NULL,
`Origin_Code` int(11) DEFAULT NULL,
`Origin_Name` varchar(30) DEFAULT NULL,
`Origin_City` varchar(19) DEFAULT NULL,
`Origin_State` char(2) DEFAULT NULL,
`Origin_Zip` int(11) DEFAULT NULL,
`Cmmd_Code` char(3) DEFAULT NULL,
`Cmmd_Description` varchar(22) DEFAULT NULL,
`Cust_Code_RC` int(11) DEFAULT NULL,
`Cust_Code_RRD` int(11) DEFAULT NULL,
`Cust_Name` varchar(34) DEFAULT NULL,
`Dest_Code` int(11) DEFAULT NULL,
`Dest_Type` varchar(3) DEFAULT NULL,
`Dest_Name` varchar(35) DEFAULT NULL,
`Dest_City` varchar(22) DEFAULT NULL,
`Dest_State` char(2) DEFAULT NULL,
`Dest_Zip` text,
`Pallets` int(11) DEFAULT NULL,
`Pieces` int(11) DEFAULT NULL,
`Weight` int(11) DEFAULT NULL,
`Revenue` int(11) DEFAULT NULL,
`Mfst1_Freight Cost` int(11) DEFAULT NULL,
`Mfst2_Freight Cost` int(11) DEFAULT NULL,
`Mfst3_Freight Cost` int(11) DEFAULT NULL,
`Job_Number` int(11) DEFAULT NULL,
`Job_Sub_Number` int(11) DEFAULT NULL,
`List_ID` varchar(3) DEFAULT NULL,
`Order` int(11) NOT NULL,
`Order_Sch_Delv_Thru` text,
`Reship1_Breakout` text,
`Reship1_City` varchar(16) DEFAULT NULL,
`Reship1_Code` int(11) DEFAULT NULL,
`Reship1_Name` varchar(31) DEFAULT NULL,
`Reship1_State` char(2) DEFAULT NULL,
`Reship1_Zip` text,
`Reship2_City` varchar(16) DEFAULT NULL,
`Reship2_Code` int(11) DEFAULT NULL,
`Reship2_Name` varchar(31) DEFAULT NULL,
`Reship2_State` char(2) DEFAULT NULL,
`Reship2_Zip` text,
`ReshIp2_Breakout` text,
`Product_Mix` int(11) DEFAULT NULL,
`Order_Act_Ship_Date` text,
`Mfst1` int(11) DEFAULT NULL,
`Carr1_Type` varchar(3) DEFAULT NULL,
`Mfst2` int(11) DEFAULT NULL,
`Carr2_Type` varchar(3) DEFAULT NULL,
`Mfst3` int(11) DEFAULT NULL,
`Carr3_Type` varchar(3) DEFAULT NULL,
`Rate_Code` text,
`Rate_Driver` text,
`Title` text,
`Cube` double DEFAULT NULL,
`Page_Count` text,
`Pool_ID` varchar(15) DEFAULT NULL,
`Version` varchar(15) DEFAULT NULL,
`Mfst1_Miles` int(11) DEFAULT NULL,
`Mfst2_Miles` int(11) DEFAULT NULL,
`Mfst3_Miles` int(11) DEFAULT NULL,
`Mfst_1_Linehaul` int(11) DEFAULT NULL,
`Mfst_1_Fuel_Sur` int(11) DEFAULT NULL,
`Mfst_1_Accessorials` int(11) DEFAULT NULL,
`Mfst_1_STP` int(11) DEFAULT NULL,
`Mfst_2_Linehaul` int(11) DEFAULT NULL,
`Mfst_2_Fuel_Sur` int(11) DEFAULT NULL,
`Mfst_2_Accessorials` int(11) DEFAULT NULL,
`Mfst_2_STP` int(11) DEFAULT NULL,
`Mfts_3_Linehaul` int(11) DEFAULT NULL,
`Mfst_3_Fuel Sur` int(11) DEFAULT NULL,
`Mfst_3_Accessorials` int(11) DEFAULT NULL,
`Mfst_3_STP` int(11) DEFAULT NULL,
PRIMARY KEY (`Order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

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.