vendredi 4 décembre 2015

SQLITE calculate mean from numbers in a text field

In SQLite I would like to calculate mean value of a set of numbers stored in a text field and update another field of my table with the result. For example: I have a varchar field named 'num' in which I've registered this string '22,32,43,54,35,16'. Is there a way for calculating the mean value of these numbers and insert the result in another numeric field named 'mean'? Thank's in advance. DF

Aucun commentaire:

Enregistrer un commentaire