Wilder1626
asked on
Oracle error - ORA-01476: divisor is equal to zero
Hi
I'm having a problem with a section of my Query. This is probably because i have NULL fields. So it can't calculate properly.
Because of that, i have this error:
ORA-01476: divisor is equal to zero
01476. 00000 - "divisor is equal to zero"
*Cause:
*Action:
How can i fix this so that i just calculate what i can?
Thanks agauin
I'm having a problem with a section of my Query. This is probably because i have NULL fields. So it can't calculate properly.
Because of that, i have this error:
ORA-01476: divisor is equal to zero
01476. 00000 - "divisor is equal to zero"
*Cause:
*Action:
How can i fix this so that i just calculate what i can?
Thanks agauin
case
when STOP_TYPE = 'DL' and INBOUND = 'N' -- OB POs
then TO_CHAR((((TOTAL_MILES - TOTAL_IB_MILES)/TOTAL_MILES) * (ORDER_WEIGHT/TOTAL_OB_WEIGHT)*FREIGHT_COST),'9,999.99')
when STOP_TYPE = 'DL' and INBOUND = 'I' -- IB POs
then TO_CHAR(((TOTAL_IB_MILES/TOTAL_MILES) * (ORDER_WEIGHT/TOTAL_IB_WEIGHT)*FREIGHT_COST),'9,999.99')
when STOP_TYPE = 'DL' and TOTAL_ELAPSED_TIME < '000:00' -- LTL loads
then TO_CHAR(((ORDER_WEIGHT/TOTAL_WEIGHT)*FREIGHT_COST),'9,999.99')
END AS PO_RATE_PRORATION
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Awesome. Glad that helped.
ASKER
Thanks, this is great. Now it works.