ARV
ARV

Reputation: 405

sortOrder on the basis of alphabets in cursorLoder

I want to sort my table on the basis of alphabetically. I am able to do it by using this query

return new CursorLoader(getActivity(),URI, null, null, null, COL_NAME);

But in this way i am getting results in this way.

A B C D ...Z a b c ....z.

I want my cursorLoder to return A a B b C c ....Z z.

Thanx.

Upvotes: 0

Views: 74

Answers (2)

Diego Torres Milano
Diego Torres Milano

Reputation: 69358

Use:

COL_NAME + " collate nocase"

Upvotes: 0

Hoan Nguyen
Hoan Nguyen

Reputation: 18151

return new CursorLoader(getActivity(),URI, null, null, null, COL_NAME + " COLLATE NOCASE");

Upvotes: 1

Related Questions