Any suggested workaround for this? I'm generating reports where I want to divide by zero - Oracle's suggested workaround is to substitute 1 for 0 - but this would create false statistics for my reports.
the question seems to be what do you want a divide by zero to represent? a reallyreallyreally big number? you can't really divide by zero in any practical sense.
DBAtrix is certainly correct. The question is what you expect the result to be when a value is divided by 0. There are mathematical arguments for both infinity and undefined. We have no way to represent infinity, but we do have NULLs to represent undefined. Therefore, the standard way this is handled is:
---:Numerator / DECODE ( :Denominator, 0, NULL, :Denominator)
Hope this helps,
thx DBAtrix and chrislong - i was approaching the problem from the wrong angle
Click Here to Expand Forum to Full Width