views:

19

answers:

2

I am trying to insert data from a csv file into mysql using BigDump.

It stops on line 2, with the error:

"Query: INSERT INTO location VALUES (1,"O1","","","",0.0000,0.0000,, );

MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' )' at line 1"

If I run the statement from withing phpmyadmin, it says:

"#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' )' at line 1"

What can I do to make the data get into the database?

Thank you.

+1  A: 

Does your insert statement contain values for every column in the table? If not, you have to name the columns.

For example,

insert into location (col1, col2, col3) values (1, 2, 3);

If you show us the structure of the LOCATION table you can get better answers.

MJB
Thank you, I prefered to change the data instead of the code of the script.
john
+1  A: 

The commas with no values looks sketchy to me.

INSERT INTO location VALUES (1,"O1","","","",0.0000,0.0000,, );

should probably be

INSERT INTO location VALUES (1,"O1","","","",0.0000,0.0000,NULL,

NULL);

Dave Markle