Incorrect Sum on decimal column

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
CodeManKS
Posts: 5
Joined: Wed 27 Mar 2013 10:50

Incorrect Sum on decimal column

Post by CodeManKS » Tue 28 May 2019 15:11

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.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Incorrect Sum on decimal column

Post by Pinturiccio » Thu 30 May 2019 17:18

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.

Post Reply