travelkind Posted January 5, 2010 Share Posted January 5, 2010 I am trying to upload some a csv file to the "raw data" table in mysql and I am getting the following error: Error SQL query: INSERT INTO `rawdata` VALUES ( '128', 'CI', 'TA', 'TA', 'TA', 'FL', 'P UL LS DIESEL', 'U', '12/28/2009', '18:00', '2.142', '0.037' ) MySQL said: #1062 - Duplicate entry '127' for key 1 I am using Server version: 5.0.67.d7 of mysql. I have tried the import a few different times (with different data) and the import seems to only import 127 rows of data. Can anyone please help me with this? Thanks Quote Link to comment Share on other sites More sharing options...
fenway Posted January 6, 2010 Share Posted January 6, 2010 That's because you're using a signed smallint as you're primary key -- big mistake. Try INT UNSIGNED instead. Quote Link to comment Share on other sites More sharing options...
travelkind Posted January 6, 2010 Author Share Posted January 6, 2010 Fenway, Thank you that solved my problem! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.