thats right, but it's much faster to send the correct query instead of reading all items and do the grouping in the source code.
isn't there any way to send a query with group by to that database? On 13 Nov., 00:31, Mark Murphy <[email protected]> wrote: > iRaS wrote: > > for some reason i would be executing a raw query or at least a query > > withgroupby clause and having clause to the table calls from > > database contacts.db. > > > The complete query i like to execute follows: > > SELECT > > * > > FROM > > calls > >GROUPBY > > number > > , type > > , IF(duration = 0, 1, 0) > > HAVING > > MAX(date) = date > > ORDER BY > > date DESC > > > Adding thegroupby clause and the having clause to the where clause > > will result in exception. Open the database (/data/data/ > > com.android.providers.contacts/databases/contacts.db) with > > SQLiteDatabase.openDatabase() also throws an exeception. > > > Any ideas? > > You do not have rights to access that database. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Warescription: Three Android Books, Plus Updates, $35/Year -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

