Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simple rounding query
In article <MPG.1b3a10a5f005d4cb989c66_at_news.individual.net>, Jeremy
says...
> Perhaps I'm being a bit thick here, but is there a single function call
> I can make in pl/sql (8.1.7.x) which wil round up to the next integer?
>
> I want:
> 29/10 = 3
> 30/10 = 3
> 31/10 = 4
>
Bad form to follow up one'e own post but here is the 'solution' I used -
it is inelegant:
declare
a number := 31;
b number := 10;
res number;
begin
res := trunc(a/b);
Seems to work but is a little long-winded.
-- jeremyReceived on Wed Jun 16 2004 - 03:20:35 CDT
![]() |
![]() |