I've a table "mytable" like this:
Id = 1 2 3 4 *** Number = 13 7 55 27
I would like to add the figures of each number with the condition that: if the add is > 9 you subtract 9. Ex. 13 = 1+3= 4 ** 7 = 0 + 7 = 7 ** 55= 5+5=10 - 9 = 1 ** 27 = 9
Code: select number%9 from mytable
But, in this case the value 27 return o, not 9 (value correct).
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire