0

I am quite new to android and SQLite and having trouble to count the token occurrence and no of rows containing the token. What I have found is
COUNT() Function and getCount() Function

Both only return the no of rows containing the token. I need to calculate the token occurrences also i.e if token is present in 5 tables rows but in row 3 token occurs 2 times I need to display 6 occurrences instead of 5.

Sorry for improper formatting if any!

1 Answers1

0

You can get this information with the x argument of the matchinfo function.

CL.
  • 173,858
  • 17
  • 217
  • 259
  • Yes, Exactly but no information is provided in the documentation about the manipulation of Blob return type. Furthermore its conversion to other data types is giving errors! – Muhammad Mansoor Oct 11 '14 at 13:21
  • Are you asking how to [convert a byte array to integers](http://stackoverflow.com/questions/7619058/convert-a-byte-array-to-integer-in-java-and-vise-versa)? – CL. Oct 11 '14 at 21:22
  • Yes. I used hex(matchinfo(Table-name)). It provided hexadecimal representation of byte array. As I have many columns so the hexadecimal notation seems hard to get manipulated. – Muhammad Mansoor Oct 12 '14 at 06:39
  • Thanks for your time and help as it paved my way to the solution I needed. – Muhammad Mansoor Oct 12 '14 at 08:50