CursorLoader - order by in SQL is case insensitive

61 Views Asked by At

I am trying to query information with a CursorLoader from my SQL database. How do I make the order case insensitive?

return new CursorLoader(this, CONTENT_URI, projection, null, null, orderBy);
1

There are 1 best solutions below

0
guipivoto On BEST ANSWER

I'm using this question/answers as source:

While ordering, you can "convert" the data to lower/upper case. Data retrieved won't be affected since you are changing the ORDER BY statement.

return new CursorLoader(this, CONTENT_URI, projection, null, null, "UPPER(COLUMN_NAME)");