I have a scenario that "create virtual table if not exists searchcontent using fts4(_id text, desc text)" is crashing with: near "NOT": syntax error: , while compiling: CREATE VIRTUAL TABLE IF NOT EXISTS
This is only happening on a galaxy nexus phone which is running 4.0.2. when I try it on a galaxy note 2 that is running 4.1.2 everything is working fine. If I remove "if not exists" again it will work on nexus phone. Does anyone know what is the error? is it android version problem?
in my sqlitehelper class:
public static final String SearchContentTable_DATABASE_CREATE = "CREATE VIRTUAL TABLE IF NOT EXISTS " + TABLE_NAME + " USING fts4 ( " +
COLUMN_ID + " " + "TEXT" + " , " +
COLUMN_TITLE + " " + "TEXT" + " , " +
COLUMN_DESCRIPTION + " " + "TEXT" + " , " +
COLUMN_KEYWORDS + " " + "TEXT" + " , " +
COLUMN_TYPE + " " + "TEXT" + " );";
@Override
public void onCreate( SQLiteDatabase database )
{
.
.
.
database.execSQL( SearchContentTable_DATABASE_CREATE );
.
.
.
}