i am trying to get a random order by using "Order by NEWID()" as following:
public Cursor getSpecialList(String bloodCategory )
{
SQLiteDatabase db=this.getReadableDatabase();
Cursor cur=db.rawQuery("SELECT "+colName+" ,"+
""+colFather+" ,"+
""+colFamily+" ,"+
""+colPhone+" from "+ListInfoTable+
" WHERE "+colBloodCategory+"='"+bloodCategory+"'"+
" order by NEWID() ",new String[] {});
return cur;
}
SQLiteLog give me an error "No such function NEWID" ?!!
Aucun commentaire:
Enregistrer un commentaire