Click here to Skip to main content
15,908,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
for eg:
consider this is for attendance percentage,it displays ZERO

Can anyone help me to find the solution i.e., is there any significance in SQL or normally it can be evaluated Mathematically.
Updated 5-Dec-13 0:44am

1 solution

Don't use INTEGER datatypes.
If Present is integer, then anything divided by it is integer, so numbers less than 1 become zero.

Try this to prove it:
Percentage=(Present * 100)/(totaldays-weekoff)
Share this answer
CPallini 5-Dec-13 6:55am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900