Hi All, I'm a newbie to MySQL and I'm trying to import a .CSV file into my MySQL database but keep getting a this error message: ERROR 1062 (23000): Duplicate Entry '4' for key 1 I've tried it both by using PhpMyAdmin and the MySQL command line prompt and no luck either way. I don't see how it could say the entries are duplicates since the data is different. Any help or suggestions would be greatly appreciated.
Here's the error message I'm getting from PhpMyAdmin: Error SQL query: INSERT INTO `lawyers` ( `firmID` , `firmName` , `Address` , `City` , `State` , `Zip` , `County` , `Phone` , `Fax` , `Website` , `lname` , `fname` , `practice1` , `practice2` , `practice3` , `practice4` , `email` ) VALUES ( '4', 'Ferris & Britton', '401 W A St # 1600', 'San Diego', 'CA', '92101-7906', 'San Diego', '6192333131', '', 'www.ferrisbritton.com', 'Britton', 'Christopher', 'Anti-Trust Licensing', 'Corporate Business', 'Personal Injury', 'Criminal Justice', 'john755@aol.com' ) MySQL said: #1062 - Duplicate entry '4' for key 1
You are having two lines with firmID as 4. Check and if they both contain the same data, delete one of them. Otherwise change the firmID of one of them to something unique.
That's what I don't understand. All the lines have unique firmID's. (starting at 1 to 3,000). I'm wondering if it's maybe the field parameters or something. As a test I tried to just import the first three collumns and that worked just fine, but not with all the fields as shown above.