简体   繁体   English

CursorLoader-SQL中的排序不区分大小写

[英]CursorLoader - order by in SQL is case insensitive

I am trying to query information with a CursorLoader from my SQL database. 我试图从我的SQL数据库中使用CursorLoader查询信息。 How do I make the order case insensitive? 如何使订单不区分大小写?

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

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. 因为您正在更改ORDER BY语句,所以检索到的数据不会受到影响。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM