Android sort sqlite query results ignoring case

mixkat picture mixkat · Feb 7, 2011 · Viewed 10.4k times · Source

just wondering if theres a way of sorting the results of a query ignoring case. Cause at the moment fields starting with an upper case letter are sorted and put on top of the list and fields starting with lower case letter are also sorted but are put after the upper case fields.

Thanks -- Mike

Answer

aaz picture aaz · Feb 7, 2011

ORDER BY column COLLATE NOCASE;

See http://www.sqlite.org/datatype3.html#collation