Re: ROUND to nearest 0.05?

From: Richard Kuhler <noone_at_nowhere.com>
Date: Mon, 12 Jan 2004 22:45:51 GMT
Message-ID: <zsFMb.55590$nG3.35_at_twister.socal.rr.com>


Richard Kuhler wrote:

> Sean Chang wrote:
> 

>> select round( price*1.015*20) /20 from your_table;
>>
>> "dbarchitech" <noble_kid_at_mac.com> wrote in message
>> news:9d3dc423.0401121131.5266739f_at_posting.google.com...
>>
>>> Hey all,
>>>
>>> For the new year we're updating our price lists to reflect an increase
>>> of 1.5%, but... we need to round the prices to the nearest 0.05. Is
>>> there a way to do this in SQL*Plus?
>>>
>>> Basically I want to emulate the MROUND function in Excel (eg.
>>> MROUND((cell*1.015), 0.05).
>>>
>>> Thoughts?
>>
>>
> 
> Why not just ...
> 
> round(price*1.015, 2)

Doh! Nevermind, I read the post too fast. Obviously the solution I posted is wrong. You will have to perform the round as Sean already correctly pointed out.

--
Richard Kuhler
Received on Mon Jan 12 2004 - 23:45:51 CET

Original text of this message