I have an application in which I order a request to my database with the ORDER BY clause, he will order them in alphabetical order. I have only one small problem, quite often it happens that one of the lines that the order orders does not contain anything (string = ") when sorting in alphabetical order, they are filled at the top of the list infront om a, b, c ... I am simple and simple, I don’t want it. after I googling a lot on the oracle forum that I have to change the part of the SORT BY request to the request "SORT BY xxx ASC NULLS LAST", this caused a fatal error in the request.
How can I fix this seemingly small problem?
here is my request like today.
public Cursor fetchAllDatesByTag() {
return mdiktationsDb.rawQuery("SELECT " + KEY_DATEID + "," +" " + KEY_DATE + "," + " " + KEY_TIME + "," + " " + KEY_DICTTAG + "," + " " + KEY_DICTLISTIMAGE + " FROM " + DATABASE_TABLE + " ORDER BY " + KEY_DICTTAG + " ASC", null);
}
source
share