I have a table T1, which has a float column representing the julianday. Now I want to delete the entries which julianday is older than n-day. I tried:
db.delete(T1, COL_JULIANDAY + " <= julianday('now', '- ? days')",
new String[] { Integer.toString(days) });
But I got an error from Android:
android.database.sqlite.SQLiteException: bind or column index out of range
I think it is because the ‘?’ mark is quoted in my where-clause.
Rather than resorting to raw SQL, I suggest trying to use concatenation operators in your where clause.