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

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple rounding query

Re: Simple rounding query

From: G Dahler <yellow-shark_at_spamex.com>
Date: Wed, 16 Jun 2004 13:41:03 -0400
Message-ID: <VC%zc.23172$nY.815329@news20.bellglobal.com>

"Jeremy" <newspostings_at_hazelweb.co.uk> a écrit dans le message de news:MPG.1b3a4ee74eb26934989c69_at_news.individual.net...
> In article <40d030b5$0$93324$e4fe514c_at_news.xs4all.nl>, Erik Ykema
> says...
>
> > What about the standard SQL-function CEIL?
> >

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions16a.htm#97803
> > Ceil (x) returns the smallest integer equal to or greater than x, hence
> > ceil (29/10)=ceil(2.9)=3
> > ceil(30/10)=ceil(3)=3
> > ceil(31/10)=ceil(3.1)=4
>
> Cheers Erik - it's a long time since I used ceil - I had forgotten it
> existed!

BEWARE: ceil(-1.0001) = -1 (It takes the smallses integer equal to or GREATER than x)

Maybe that's not what you want for negative numbers ! Received on Wed Jun 16 2004 - 12:41:03 CDT

Original text of this message

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