I would like to see if I can get a sample method written in Android that would achieve the following:
Loop through each row in a SQLlite table; grab the sum of all numbers;
to keep simple, lets say there are 3 columns with a numeric value in each row, and a forth that is simply the “row id” that should not be included.
(Let’s assume the table has been created and everything is set-up; just looking for the method that would do this. Lets sat the method outputs the number to a TextView on the activity that calls it).
Hope, you have basic knowledge and you can operate with
Cursor.Cursorwith your dataSet result to
TextView