Linked Questions
113 questions linked to/from How to insert multiple rows in SQLite?
9 votes
3 answers
36k views
How to insert multiple rows into a SQLite 3 table? [duplicate]
In MySQL I'd use INSERT INTO `mytable` (`col1`, `col2`) VALUES (1, 'aaa'), (2, 'bbb'); but this causes an error in SQLite. What is the correct syntax for SQLite?
3 votes
1 answer
17k views
"SQLite error near ",": syntax error" [duplicate]
I am using sqlite3 and trying to put data into my database. INSERT INTO Structure VALUES ('521D5E7ABC165','1','DECODE','T','4','Y','Y'), ('521D5E7ABC165','2','DEDESC','T','40','N','Y'), ('...
3 votes
2 answers
7k views
SQLite 'INSERT INTO' Error - Populate new table [duplicate]
I searched the hinted posts, when posting this question but I foud none similar, so I apologize if I missed any. Here's my problem. I created a table and it's fields, in SQLite Administrator, then I ...
1 vote
2 answers
1k views
Android SQLiteException: near ",": syntax error: , while compiling INSERT [duplicate]
I'm trying to insert values into table public class DatabaseHandler extends SQLiteOpenHelper { private final static String INSERT_INTO_COUNTRIES = "INSERT INTO " + TABLE_COUNTRIES ...
1 vote
1 answer
1k views
SQLite Syntax error while compiling: INSERT INTO [duplicate]
I'm getting this RuntimeException when executing an AsyncTask: Caused by: android.database.sqlite.SQLiteException: near ",": syntax error: , while compiling: INSERT INTO 'infrastructure' (lift,name,...
0 votes
3 answers
2k views
SQLiteDatabase.execSQL(query) - Multiple SQL commands inside the onCreate() method not working [duplicate]
I am new to android. I haven't worked with SQLite DBs before. I think this is a very basic question, but I am unable to find the solution. The code is here (assume declarations) public void onCreate(...
1 vote
2 answers
2k views
Error in inserting multiple records to SQLite database using Javascript [duplicate]
I am developing a application for Android using PhoneGap. I am trying to insert multiple records to table in a single query using Javascript. I am getting a error like syntax error near ",". My Code :...
-2 votes
2 answers
981 views
Easy way to do mysql "INSERT INTO" to Mysqllite [duplicate]
Hi I have the following Mysql code (Which i export from Mysql DB before I delete my tables from it). Now I have a MySQLlite DB, and I have the corresponding tables in this database. But when I run the ...
-6 votes
2 answers
871 views
SQLite Syntax Error code(1) [duplicate]
I am facing problem from long time. I am dynamically generating insert query in android SQLite database it throws following error. android.database.sqlite.SQLiteException: near "(": syntax ...
1 vote
2 answers
575 views
Error adding multiple rows to sqlite database on android [duplicate]
An error occurs when I try to add mulitple rows to the sqlite database. With a single row theres no problem. Additionally the app crashes due to this on a samsung galaxy s2, but not on a nexus. ...
2 votes
2 answers
432 views
Insert Error SqLite in Android 4.0.3 [duplicate]
i have a Sqlite problem in my tablet Android 4.0.3v; Error: 07-28 14:28:18.495 6995-7125/com.titan.tablet E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-544 android.database.sqlite.SQLiteException: ...
1 vote
1 answer
122 views
trouble with inserting multiple records? [duplicate]
I use sql query to insert data into database, everything work fine if i insert just one record into table,here is my code 1. setData("insert into table(name,age) values ('john','23')"); code for ...
0 votes
1 answer
94 views
How to insert SQLite more than 2 rows? [duplicate]
So I created this DB. private static final String NOME_DB = "bancomuseu.db"; public static final String TABELA = "tbl_itens"; public static final String ID = "id"; public static ...
0 votes
1 answer
84 views
SQLite inserting multiple rows not working [duplicate]
I'm trying to insert multiple rows at once using the new syntax introduced in SQLite 3.7.11 I have 3.8.10.2 so this should work fine, but it doesn't. INSERT OR IGNORE INTO leaderheadsplayers (name, ...
3 votes
0 answers
25 views
SQLite error in Java is not reproduced elsewhere [duplicate]
A java application I am working on uses local SQLite databases for certain data, using https://bitbucket.org/xerial/sqlite-jdbc version 3.8.10.2. I parse data from an excel spreadsheet and then ...