Site icon IT Tutorial

ORA-01476 divisor is equal to zero

I got ” ORA-01476 divisor is equal to zero ”  error in Oracle database.

 

ORA-01476 divisor is equal to zero

 

Details of error are as follows.

ORA-01476 divisor is equal to zero

Cause: An expression attempted to divide by zero.

Action: Correct the expression, then retry the operation


 

 

divisor is equal to zero

This ORA-01476 errors are related with the expression attempted to divide by zero.

Correct the expression, then retry the operation

To solve this error, don’t use to divide by ZERO value, Use another value instead of ZERO.

Or you can use NULLIF function to solve this error.

NULLIF(expr1, expr2)

 

 

Or you can use the DECODE function as follows.

DECODE(COLUMN2,0,0,((COLUMN1/COLUMN2)*100))

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version