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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem with Oracle rounding integers

Re: Problem with Oracle rounding integers

From: Buck Turgidson <sam_i_am_jcman_at_worldnet.att.net>
Date: 2000/07/15
Message-ID: <hw%b5.8304$tI4.639984@bgtnsc05-news.ops.worldnet.att.net>#1/1

Not sure I understand your question. Is this what you want to do?

SQL> select floor(1/2) from dual;

FLOOR(1/2)


         0

Charles Basner <chasbas_at_tipsinc.com> wrote in message news:cBJb5.21284$Uq6.396438_at_typhoon2.ba-dsg.net...
> I am trying to divide two integers (say, 1/2) and having Oracle round the
> result (so I get 0.5 rounded = 1 instead of 0). Is there any way around
> this? The book says using PLS_INTEGERs will work, but it doesn't. It
 also
> says using a NUMBER(10) and leaving out the scale will not round, but that
> doesn't work either. Can anyone give me any suggestions?
>
> Thanks! I am using Oracle 8i on WinNT
>
> Charles
>
>
Received on Sat Jul 15 2000 - 00:00:00 CDT

Original text of this message

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