Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Division by zero: how to handle?
I would look at the decode or case statement. They are both a form of
inline IF statements and you should be able to handle this problem using
them.
something like
select decode(nvl(a),0,0, a/b) "MYVALUE" from ....
Georg Scholz wrote:
> Dear all,
>
> This might look like a simple question, but I didn't find a clue in the
> manuals:
>
> Is there a way to handle divisions by zero?
>
> SELECT a / b FROM ...
>
...
>
> Any hint is highly appreciated
> Thank you
> Georg Scholz
> ---
> www.scholz-informatik.at
Received on Wed Jun 04 2003 - 09:59:03 CDT