Home » SQL & PL/SQL » SQL & PL/SQL » see error in query ORA-01476: divisor is equal to zero
see error in query ORA-01476: divisor is equal to zero [message #183473] Fri, 21 July 2006 02:20 Go to next message
mfa786
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
sir i user this query but system give me error

SELECT STUSECMTAMT.totdebit/STUSECMTAMT.totalcr,STUJOURNAL.cre_bal/(STUSECMTAMT.totdebit/STUSECMTAMT.totalcr) FROM STUSECMTAMT,STUDEG,STUJOURNAL WHERE STUSECMTAMT.vhno=STUJOURNAL.ref_no AND STUSECMTAMT.studegid=STUDEG.studegid;

error


ERROR at line 1:
ORA-01476: divisor is equal to zero


please give me idea

thank

aamir
Re: see error in query ORA-01476: divisor is equal to zero [message #183474 is a reply to message #183473] Fri, 21 July 2006 02:23 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
What is unclear in the error message from the database?

the divisor: the part after the "/" sign
zero: one less than one, i.e. 0.

So somewhere in your query you are trying to divide a number by zero. I think it might be the STUSECMTAMT.totalcr column that has some zeroes in it.

MHE
Re: see error in query ORA-01476: divisor is equal to zero [message #183475 is a reply to message #183473] Fri, 21 July 2006 02:24 Go to previous message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

The answer is in your error code itself .

ensure that STUSECMTAMT.totalcr and STUSECMTAMT.totdebit are not equal to ZERO ..

[ I am Always Second Razz ]

Thumbs Up
Rajuvan.

[Updated on: Fri, 21 July 2006 02:26]

Report message to a moderator

Previous Topic: GENERATE A SEQUENCE OBJECT
Next Topic: setQueryTimeout(...) and too many threads
Goto Forum:
  


Current Time: Sun Aug 24 13:58:21 CDT 2025