chump2877
01-16-2005, 02:36 AM
Here's my situation:
I've got a .csv file that I created with Excel...I noticed that when I opened up this file in a text editor, that there were lots of trailing commas on subsequent lines following the actual data...I cleaned up the file by deleting these commas, and resaved the file as .csv in my text editor....Then, I used a conversion tool that I found (you can see it HERE (http://www.sqldbu.com/eng/sections/tips/mysqlimport.html)) to convert the .csv file to core SQL (i know the conversion tool works because I've used it before)...Now, I'm trying to upload the resulting text file with SQL code to my server using phpMyAdmin...I feel like I've done everything right so far, but I keep getting this error from phpMyAdmin when I try to upload the SQL code:
Error
SQL-query :
CREATE TABLE IF NOT EXISTS parts2(
AC0020 CHAR( 10 ) NOT NULL default '',
Microphone_Headset CHAR( 53 ) NOT NULL default '',
5.35CHAR( 42 ) NOT NULL default '',
RECNO INT( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
PRIMARY KEY ( RECNO )
)
MySQL said:
#1064 - You have an error in your SQL syntax near '5.35 CHAR(42) NOT NULL default '', RECNO INT(10) unsigned NOT NULL auto_incremen' at line 1
I believe the syntax should be correct and there should be no typos, but the error seems to indicate otherwise....I'm really at a loss here...I'd include the SQL code, but the file is too large to post here....I can email it to someone if they cared enough to take a look at it....
Thanks in advance for any help you can provide with this one!! :)
I've got a .csv file that I created with Excel...I noticed that when I opened up this file in a text editor, that there were lots of trailing commas on subsequent lines following the actual data...I cleaned up the file by deleting these commas, and resaved the file as .csv in my text editor....Then, I used a conversion tool that I found (you can see it HERE (http://www.sqldbu.com/eng/sections/tips/mysqlimport.html)) to convert the .csv file to core SQL (i know the conversion tool works because I've used it before)...Now, I'm trying to upload the resulting text file with SQL code to my server using phpMyAdmin...I feel like I've done everything right so far, but I keep getting this error from phpMyAdmin when I try to upload the SQL code:
Error
SQL-query :
CREATE TABLE IF NOT EXISTS parts2(
AC0020 CHAR( 10 ) NOT NULL default '',
Microphone_Headset CHAR( 53 ) NOT NULL default '',
5.35CHAR( 42 ) NOT NULL default '',
RECNO INT( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
PRIMARY KEY ( RECNO )
)
MySQL said:
#1064 - You have an error in your SQL syntax near '5.35 CHAR(42) NOT NULL default '', RECNO INT(10) unsigned NOT NULL auto_incremen' at line 1
I believe the syntax should be correct and there should be no typos, but the error seems to indicate otherwise....I'm really at a loss here...I'd include the SQL code, but the file is too large to post here....I can email it to someone if they cared enough to take a look at it....
Thanks in advance for any help you can provide with this one!! :)