On May 16, 2008, at 2:42 AM, Adam de Zoete wrote:
Thanks for your responses, i thought it was a float problem so i was
trying to CAST as a DECIMAL to fix it. It turns out (and the manual
does not document this) that casting as decimals doesn't actually
work in mysql 4.1.20. ROUND() is need
Thanks for your responses, i thought it was a float problem so i was
trying to CAST as a DECIMAL to fix it. It turns out (and the manual does
not document this) that casting as decimals doesn't actually work in
mysql 4.1.20. ROUND() is needed instead.
mysql> select ROUND(11.11-FLOOR(11.11),2)>
> -Original Message-
> From: Adam de Zoete [mailto:[EMAIL PROTECTED] On Behalf Of
> Adam de Zoete
> Sent: Thursday, May 15, 2008 6:24 AM
> To: mysql@lists.mysql.com
> Subject: Floor Decimal Math
>
> Hi,
>
> I'm running mysql 4.1.20 (Mac OS 10.4.11) and w
rsday, May 15, 2008 7:24 AM
>To: mysql@lists.mysql.com
>Subject: Floor Decimal Math
>
>Hi,
>
>I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't
>returning the right answer? Maybe i'm missing something or am i
On Thursday 15 May 2008 13:24:10 Adam de Zoete wrote:
> Hi,
>
> I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't
> returning the right answer? Maybe i'm missing something or am i doing
> something wrong?
Perhaps it is performing FLOAT and not DECIMAL math. 11.11 is represent
Hi,
I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't
returning the right answer? Maybe i'm missing something or am i doing
something wrong?
mysql> select (11.11-FLOOR(11.11))>=0.11;
++
| (11.11-FLOOR(11.11))>=0.11 |
+--