Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Number problem

Re: Number problem

From: Steve Jelfs <steve_at_trolltec.co.uk>
Date: Thu, 23 Dec 2004 12:55:40 +0000
Message-ID: <41CAC04C.8020808@trolltec.co.uk>


Steve Jelfs wrote:
>Within Oracle, how can I round up an 8 figure number to the nearest 5000
>such that 96136462 becomes 9614000 and 96130045 becomes 96135000?
>Maths was never my strong point!!! ;-)
>
>Steve
>
>
>
>

Sorry to answer my own question but how often do you ask a question only to have a eureka moment??? i think this does it for anyone who remains curious!

floor(:num/10000)*10000+5000*(floor((mod(:num,10000)/5000)+1))

Steve - feeling pleaseD with himself!!

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Dec 23 2004 - 06:51:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US