Cleidson
Member
Hello everybody,
A strange situation has occurred to me when using the sqlite sum function. The application I've been developing uses sqlite as a database and many fields in the tables were declared as REAL. I have been inserting the values without any problem in the fields, but when I do a select with the sum function the query return is less than the real value that the query should return. In some cases the same select sum statement returns with a difference of 10 cents from one query to another. And the amount of lines to add is small, at the moment I have 60 launches. Which becomes a bigger problem when you start scaling releases.
I use a variable of type Double and ExecSingleResult2 to query the database.
The statement is usually Select coalesce (sum(value), 0) From Table
I made another function to validate the query by using execquery and iterating line by line. In this test the result is as expected.
Has anyone experienced this problem?
I thank you for your attention.
A strange situation has occurred to me when using the sqlite sum function. The application I've been developing uses sqlite as a database and many fields in the tables were declared as REAL. I have been inserting the values without any problem in the fields, but when I do a select with the sum function the query return is less than the real value that the query should return. In some cases the same select sum statement returns with a difference of 10 cents from one query to another. And the amount of lines to add is small, at the moment I have 60 launches. Which becomes a bigger problem when you start scaling releases.
I use a variable of type Double and ExecSingleResult2 to query the database.
The statement is usually Select coalesce (sum(value), 0) From Table
I made another function to validate the query by using execquery and iterating line by line. In this test the result is as expected.
Has anyone experienced this problem?
I thank you for your attention.