I am trying to insert csv data into a table
mysql> load data infile '/var/www/PLU.csv' into table Food2 fields terminated by ',' enclosed by '"' lines terminated by '\n' ;
ERROR 1062 (23000): Duplicate entry '4014' for key 'PRIMARY'
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| PLU | char(6) | NO | PRI | NULL | |
| Item | varchar(30) | YES | | NULL | |
| Type | varchar(30) | YES | | NULL | |
| Size | varchar(10) | YES | | NULL | |
| InStock | int(5) | YES | | NULL | |
| OrderPoint | tinyint(5) | YES | | NULL | |
| OPFlag | tinyint(1) | YES | | NULL | |
| StockWanted | int(3) | YES | | NULL | |
| Price | float | YES | | NULL | |
| WeightFlag | tinyint(1) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
Here is a sample of the csv data..
3615,"APPLES","Civni",,,,,,,
3630,"APPLES","Co-op 43",,,,,,,
4104,"APPLES","Cortland","Small",10,5,0,15,0.25,1
4106,"APPLES","Cortland","Large",12,5,0,15,0.30,1
4105,"APPLES","Cox Orange Pippin",,,,,,,
4107,"APPLES","Crab",,15,7,0,25,0.15,0
The troublesome primary key has been removed, the table dropped and recreated, the csv file has been recreated, all with no success.