Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem with Oracle rounding integers
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
![]() |
![]() |