Hello
CREATE TABLE deci (deci decimal(8,2));
INSERT INTO deci VALUES (-2427.88);
INSERT INTO deci VALUES (2427.89);
INSERT INTO deci VALUES (-0.01);
select sum(deci) as s from deci having s<0;
+-------+
| s |
+-------+
| -0.00 |
+-------+
Well for the values given above - monetary values - the datatype seems just
fine. I would even be ok if mysql treats something that is really rounded
up to 0 but not in fact 0 as <0 but in this case I cannot see the reason.
Is this a bug or is the decimal type just evil or how should *I* behave
when having such a table?
thanks & bye,
-christian-
--
Christian Hammers WESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php