0

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.

2 Answers 2

2

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);

Sign up to request clarification or add additional context in comments.

Comments

2

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.

1 Comment

Thank you, I prefered to change the data instead of the code of the script.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.