I've got a sqlite table with real numbers, two decimal place precision, in a mydollar_column. (There are no null values, but some of the values are negative numbers) For some reason, using sql on those values, always returns 0.00000. I've tried this in Qspatialite (with QGIS 1.8) and Spatialite_GUI.
Here's an SQL example:
SELECT sum(mydollar_column) FROM myTable
If I use the sum function on an integer column, it works. For example, I used
sum(pkuid)on the primary key, and the sum() works as expected.
As a test, when I export the table to csv file, the values of my dollar_column are real numbers with two decimal place precision, for example "1234.56" But Qspatialite and Spatialite GUI always shows the values as, for example "$1,234.56" I've also used the total(mydollar_column) function with the same unsuccessful results.
- Does anyone know why I'm unable to calculate my dollar_column?
- How does Qspatialite and Spatialite_GUI interpret the values of mydollar_column as dollars, when sqlite is typeless columns?