Page 1 of 1

Incorrect Sum on decimal column

Posted: Tue 28 May 2019 15:11
by CodeManKS
Hello,

I have trouble with the result of a SUM command. In my table, a decimal field is set at 18.2.

The values in the table are

price | obj
--------------
400 | flowers
120.50 | cars
77.77 | wheels

My querry is 'select SUM (price) as totalprice, obj from table group by price, obj'. If the first value has no decimal places, as in the example, the DotConnect universal adapter provides values without digits:

price | obj
----------
400 | flowers
120 | cars
77 | wheels

But: is the first value with digits, so for example 400.12 than returns the querry

price | obj
-------------
400.12 | flowers
120.50 | cars
77.77 | wheels

What happens here? But in SQLiteStudio I always get the correct result, regardless of the first digit.
Any idea?

Thanks for help.

Re: Incorrect Sum on decimal column

Posted: Thu 30 May 2019 17:18
by Pinturiccio
We could not reproduce the issue. Please specify the version of dotConnect Universal.

If possible, create and send us a small complete test project, which reproduces the issue. Please also send us the SQLite database with which issue can be reproduced.