Page 1 of 1

Problems with Sum() and Decimal Fields

Posted: Thu 20 Oct 2005 13:25
by MvS
Hi,

I Use D2005, MySQL 5.0.13 and a registered version of DBExpress Driver 2.60.7.

When I use a SQL-Statement with TSimpleDataset like:

Code: Select all

Select a, sum(Decimal field) as b from 1 group by a
Field b becomes a TFMTBCDField
According to the readme file it should be a TBCDField
How can i fix this problem, because it shows now incorrect values when I use a TDBGrid.

Mark

Posted: Thu 20 Oct 2005 14:00
by Ikar
The reason of this behavior is increasing of field precision.
You should use CAST statement to decrease precision back.