Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Divide By zero error

Re: Divide By zero error

From: Brian W. Chester <bwchester_at_home.com>
Date: Mon, 14 Feb 2000 14:10:09 GMT
Message-ID: <51Up4.6379$a27.174331@news1.rdc1.mb.home.com>


Parvinder,

Use and exception handler in your pl/sql code. User the ZERO_DIVIDE exception and set your variable to the value you want. If the division statement is in the middle of a block of code, you may have to use an anonymous block so that the code with continue execution after the exception is raised. See chapter 6 in the PL/SQL Users Guide and Reference (release 8.0.5 anyway).

HTH Brian

"Parvinder Singh" <parora_at_questone.com> wrote in message news:38A7FFF2.53440026_at_questone.com...
> Hi all
>
> Can i somehow get rid of "divide by zero error" ?
> ERROR:
> ORA-01476: divisor is equal to zero
> All i want is wherever the divisor's value comes to 0 it should give
> the result of the division as 0
> Can i somehow achieve this ?????
>
> regards
> ~Parvinder
>
>
>
Received on Mon Feb 14 2000 - 08:10:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US