Hi !
I tried to calculate an average from a selection. The selection depends on the value of a spinner.
The table1 from mydatebase is like this :
mabase.ExecNonQuery("CREATE TABLE table1 (id INTEGER PRIMARY KEY, date DATE , nbrgem BYTE, finditem BYTE)")
I tried this but it doesn't work:
Thank you for your help !
I tried to calculate an average from a selection. The selection depends on the value of a spinner.
The table1 from mydatebase is like this :
mabase.ExecNonQuery("CREATE TABLE table1 (id INTEGER PRIMARY KEY, date DATE , nbrgem BYTE, finditem BYTE)")
I tried this but it doesn't work:
B4X:
Dim myaverage as int
Dim spnFindItem as spinner
myaverage = mydatabase.Execquery2 ("SELECT AVG(nbrgem) FROM table1 WHERE finditem = ?", Array As Object( spnFindItem ))
Thank you for your help !