Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: need to narrow down value
MSWEENEY schrieb:
> I have a query where a function calculates a percentage. Now I just
> want to get the answer rounded to the nearest 10ths.
>
> Example:
>
> sum(c.pp_hours/b.hours*100)||'%' as Percent_pp
>
> result: 95.7446808510638297
>
> I tried the following:
>
> sum(c.pp_hours/b.hours*100, 1, 5)||'%' as Percent_pp
>
> and got the error: ORA-00909: invalid number of arguments
>
> How do I round this off to the tenths?
>
> Thanks for all of the help!!!
>
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions135.htm#i78633
might be helpful.
Also, argument of SUM() may be an expression, but not the list.
Best regards
Maxim Received on Fri Feb 24 2006 - 06:30:35 CST