Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01476 divisor is equal to zero error
Darren wrote:
> Can anyone help,
> I'm trying to create a simple condition where Revenue / Total_duration = PPM.
> but keep coming across the same issue .
>
> This is the part of the code I'm having problems with.
>
> SUM(DECODE(PERIOD_YR_MTH,'200404',REVENUE/TOTAL_DURATION,0)) AS PPM
>
> Does anyone have a solution?
try:
SUM(DECODE(PERIOD_YR_MTH,'200404',REVENUE/decode(TOTAL_DURATION,0,1,total_duration),0))
AS PPM
Received on Fri May 21 2004 - 10:17:08 CDT