error in query ORA-01476: divisor is equal to zero

All the discussion which is not possible in the above forums should be posted here.
Post Reply
mfa786
Posts: 51
Joined: Thu Jun 01, 2006 4:37 am
Location: Pakistan

error in query ORA-01476: divisor is equal to zero

Post by mfa786 »

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
ahmadbilal
Posts: 615
Joined: Mon Sep 18, 2006 1:32 am
Location: United Arab Emirates
Contact:

Post by ahmadbilal »

nvl(colname,1) will solve your problem
admin
Posts: 2063
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Post by admin »

Zero devisor error comes when you are deviding with 0 like 25/0. The best way is to remove division "/" from the query and see the data and you will find zero's. thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest