try: lines terminated by '\r\n';
> -----Original Message----- > From: Chip Wiegand [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 08, 2004 3:36 PM > To: [EMAIL PROTECTED] > Subject: problem importing .csv (excel format) into mysql > > > I was sent an excel file from a remote office, and need to put the data > into a mysql database to be displayed on our web site. I removed a few > lines of fluff from the excel file and saved it as .csv (using .csv > (ms-dos)). When I try to import the file it gives me a duplicate > entry for > key 1 error. I have looked through the file and the duplicate item it is > pointing to does not exist in the file. Here is the error: > > mysql> load data infile '/usr/home/autopilots/whs4.csv' > -> into table refurbs > -> fields terminated by ',' > -> optionally enclosed by '"' > -> lines terminated by '\n'; > ERROR 1062: Duplicate entry '2147483647' for key 1 > > (When I try to import through phpMyAdmin-2.5.6 it doesn't work > also, keeps > telling me to load a file, which is done by pressing Browse button.) > > Any ideas what could cause it to fail on a non-existant key? Is there a > trick to loading Excel .csv files into mysql? > > Thanks > -- > Chip Wiegand > Computer Services > Simrad, Inc > www.simradusa.com > www.simrad.com > [EMAIL PROTECTED] > > "When I'm working on a problem, I never think about beauty. I think only > how to solve the problem. But when I have finished, if the > solution is not > beautiful, I know it is wrong." - R. Buckminster Fuller -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]