Ok. Here it is.
I'm trying to create a data summary screen.
My db layout is _id, joinedDate, isActive, firstName, lastName
I want my cursor to return recordDate . . and a count for the number
of records that have that particular date.
I just want joindDate and and a record count column.
First I tried:
db.rawQuery("SELECT joinedDate, count(_id) AS count FROM myTable GROUP
BY joinedDate", null);
After some debugging and reading I see that cursors have to have _id
returned. So I tried . .
db.rawQuery("SELECT joinedDate AS '_id', count(isActive) AS count FROM
myTable GROUP BY _id")
This query appears to be returning 4 rows 2 columns. But is bombing
out with this error:
228 CursorWindow Bad request for field slot 0,-1. numRows = 4,
numColumns = 2
Can anyone tell me what is wrong or . . how to better accomplish
this ?
--
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