I would like to know how to change a decimal to a fraction for printout purposes only.
I.E.
34.0625 = = 34 1/16
The number or float in the DB would still be the same but when it is sent to the front end I would like it to be sent as a fraction to the nearest 1/16th. Is there a method in MySql to do this?
Ignatius Reilly 7 October 2003 00:04:39 [ permanent link ]
Try something along this line:
SELECT FLOOR( mycol ) AS integer_part, ROUND( ( mycol - FLOOR( mycol ) )*16 ) AS num
Ignatius _________________________ ----- Original Message ----- From: "Warren S. Wyght" <warren@wyght.com> To: <win32@lists.mysql.com> Sent: Monday, October 06, 2003 11:27 PM Subject: Change decimal to fraction
I would like to know how to change a decimal to a fraction for printout> purposes only.>
I.E.>
34.0625 = = 34 1/16>
The number or float in the DB would still be the same but when it is> sent to the front end I would like it to be sent as a fraction to the> nearest 1/16th. Is there a method in MySql to do this?>
.38 = thirty-eight hundredths = 38/100 now simpify, find the number that will go into the top and the bottom numbers of the fraction the same amount of times = 19/50.
100113SLCN UGG Bailey Button or not listing, the sale of those UGG Classic Cardy shoes were broken from the factory out of a small amount of code of UGG Classic Mini shoes, if the yardage is complete, it is UGG Classic Tall, it is impossible to thing. See vamps, really UGG very bright and clean, car line is 9 per inch needle, margin is uniform, line moderately elastic, there will be no floating lines, break, jump pin. UGG Ultra Short shoe feel very good, but there is no rupture, breakage. http://www.love-ugg.com/products_all.html
If you would like to report an abuse of our service, such as a spam message, please . Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .