Thanks Paul.

but I think the function I was looking for was ROUND(X,D), the TRUNCATE(X,D) just 'trims' it :)

IE using the value 123.336 and I needed it to round off to 123.34 in this case.

mysql> select truncate(123.336,2);
+---------------------+
| truncate(123.336,2) |
+---------------------+
|              123.33 |
+---------------------+
1 row in set (0.00 sec)

mysql> select round(123.336,2);
+------------------+
| round(123.336,2) |
+------------------+
|           123.34 |
+------------------+
1 row in set (0.00 sec)

But your suggestion allowed to find the what I was looking for,... appreciate it :)

--
Mike<mickalo>Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Quality Web Hosting
http://www.justlightening.net
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Paul DuBois wrote:
At 16:34 -0600 11/22/03, Mike Blezien wrote:

Hello,

I need the ability to round off dollar amounts to the nearest 100th of a dollar amount, IE $14.9564 to $14.96 or $132.1123 to $113.11

can this be accomplished with MySQL SQL function ??


Sounds like a job for TRUNCATE().

http://www.mysql.com/doc/en/Mathematical_functions.html






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



Reply via email to