0

I'm trying to adapt my database dump into SQLite format, using the following command: cat db.sql | sqlite3 sqlite.db

I get the following error: Error: near line 82: near ",": syntax error , where line 82 stands for: INSERT INTO files (file_id,file_name) VALUES (the insert data in the following format (31, 'file_name.pdf'), come after that in the following lines).

According to this tutorial it is correct SQLite syntax for INSERT. What am I doing wrong?

3
  • Line 82: INSERT INTO files (file_id,file_name) VALUES, line 83: (31, 'file_name.pdf'),. Commented Sep 9, 2012 at 15:20
  • can you still post lines before and after line 83? i need to see how your records are formatted. Commented Sep 9, 2012 at 15:22
  • In this table ('files'), all the values are formatted in the same way and the last line with values to insert is: (55, 'filexxx.pdf');. Commented Sep 9, 2012 at 15:25

1 Answer 1

1

Having more than one record in one INSERT command is not standard SQL.

If you use this syntax, you'd need at least SQLite 3.7.11.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.