C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




didvide by zero error


Posted Date: 28 Aug 2008      Total Responses: 2

Posted By: sushil kumar       Member Level: Bronze     Points: 1


i am having a problem, i face error divide by zero although i am checking case pl suggest me solu.

select state,100/(count(case when (katchapucca=1) then(case(noofrooms) when 0 then null else noofrooms end)end)) from sch_infrastructure,school_code,state_code where sch_infrastructure.school_code=school_code.school_code and school_code.st_code=state_code.st_code and state_code.st_code=school_code.st_code
group by state order by state




Responses

Author: vipul    28 Aug 2008Member Level: DiamondRating:     Points: 2
hi,
waht is "noofrooms" field it is bit or anything else
if possible then put your data with filed name

vipul,
http://dongavipul.blogspot.com


Author: sireesha    28 Aug 2008Member Level: SilverRating:     Points: 2
Hi,
r u sendig value for katchapucca as 1 or any thing else
There is condition only when it is 1.

Siri


Post Reply
You must Sign In to post a response.
Next : Convert Rows into Columns for varchar type
Previous : Sql data
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

UK Conference calling Company

Contact Us    Privacy Policy    Terms Of Use