开发者

Is it possible have something like the GROUP BY clause in an Android managedQuery?

开发者 https://www.devze.com 2023-02-21 21:56 出处:网络
I\'m planning to support Android devices from 2.0 onwards so I am using a managedQuery to query contacts.I get multiple results for people with the same name and phone number so I would like those res

I'm planning to support Android devices from 2.0 onwards so I am using a managedQuery to query contacts. I get multiple results for people with the same name and phone number so I would like those results to be grouped. 开发者_运维技巧 (That is I want each name and phone number combination to be unique)

IS it possicle to group these results in a managed query (similar to the GROUP BY clause in SQL)

Mel


You can use a hack in the selection statement like "1) GROUP BY (" + Phone.DISPLAY_NAME;.

0

精彩评论

暂无评论...
验证码 换一张
取 消