Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Attempting to get Result as "%"
I am very much a beginner at SQL and use iSQL primarily. I have a
fairly simple query and which performs a SUM function whereby one
number is divided by another. I would like the answer to be provided
as a percentage as opposed to a decimal.
example:
((NVL(SUM(PRODUCTION),0)/NVL(SUM(ON_DUTY),0))-1) AS UTILIZATION
PRODUCTION - 69
ON_DUTY - 120
UTILIZATION RESPONSE: 0.575
DESIRED RESPONSE: 57.5%
Also, I get the following error and only certain records are reported:
ERROR:
ORA-01476: divisor is equal to zero
Any help is greatly appreciated!
Mark Received on Fri Feb 03 2006 - 05:22:34 CST