var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Why ROUND doesnt work on aggregated valuse
Im trying to round aggregated fields, however it seems the
round command is ignored and i keep getting .000000000001 values.
Why is the ROUND command ignored in the following statement?
ROUND (SUM (Purchases) ,2) FROM tbl_Product_Purchases
What can I try which will work?
What kind of field is Purchases? Is it floating point or real? These are approximate values, and are subject to rounding errors.
Try this and see if it doesn't solve your problem:
SELECT ROUND (SUM (Cast(Purchases as Decimal(10,2))) ,2) FROM tbl_Product_Purchases
... or consider to retrieve your value as an integer:
SELECT FLOOR (SUM (Purchases) * 100) FROM tbl_Product_Purchases
Make everything as simple as possible, but not simpler! - A. Einstein
DB Problems? DB Explorer
, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool
Thanks Blindman, it works perfrctly now.