Hmmm, peculiar... Tried it on 4.1.6-gamma-nt and works fine:

SELECT ROUND(3.575, 2); = 3,57
SELECT ROUND(3.565, 2); = 3.56

The round() function probably cuts off the last bit...

More info: http://lists.mysql.com/myodbc/8 

Regards,

Edgar

-----Oorspronkelijk bericht-----
Van: Tom Butterworth [mailto:[EMAIL PROTECTED] 
Verzonden: maandag 25 oktober 2004 19:35
Aan: [EMAIL PROTECTED]
Onderwerp: rounding problem

Hi

I seem to be having problems returning the expected results when using 
the mysql ROUND() function.

Rounding 3.565 to 2 decimal places i would expect to return 3.57 
however using

SELECT ROUND(3.565, 2);

it returns 3.56. While using

SELECT ROUND(3.575, 2);

works as expected returning 3.58.

I am using mysql version 3.23.54. Any help much appreciated.

Cheers

Buttie


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to