[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: decimal(8,2) rounding bug or still "to be expected" behaviour?


On Fri, Mar 09, 2001 at 08:13:24AM -0600, Gerald L. Clark wrote:
> I think you meant
>  select sum(deci) as s where deci<0;
> > select sum(deci) as s from deci having s<0;

No, I really meant my SELECT. MySQL counted the 3 values together but
instead of coming to the conclusion that the sum is zero it showed me
-0.00 as output by in a comparision to 0 the "output" of the sum(deci)
was *not* 0 but something different.

(I wanted to see how many customers with open or unbalanced invoices we 
have and mysql always gave me a much to high number because it made
rouding errors when adding the sums)

bye,

 -christian-


-- 
Christian Hammers    WESTEND GmbH - Aachen und Dueren     Tel 0241/701333-0
ch@xxxxxxxxxxx     Internet & Security for Professionals    Fax 0241/911879
           WESTEND ist CISCO Systems Partner - Premium Certified

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <mysql-thread67784@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.