In this BLOG post I’ll outline a method of converting a value in a text field into a number. So whilst I have what appears to be a number such as 43 or 43.0 or 43.67 in a text field, that is not the case. It is a string.
Whilst these apparent numbers are strings they cannot be used meaningfully in a mathematical SQL. An example of below, so what we find is that instead of adding the values, the strings concatenate.
A simple trick is to multiply the numbers by 1, this converts the strings and elevates the data type to a float.