alvin567 Posted June 4, 2012 Share Posted June 4, 2012 SELECT COUNT(*) * 100/(Select COUNT(*) FROM claims AS Count But the problem is count always truncate the nearer integer value?! Link to comment https://forums.phpfreaks.com/topic/263618-percentage-value/ Share on other sites More sharing options...
alvin567 Posted June 4, 2012 Author Share Posted June 4, 2012 COUNT(*) AS quantity,round(COUNT(*)*100.00/(Select COUNT(*) FROM claims),2,1), the problem is it keeps returning value like 17.33000000000000000000 Link to comment https://forums.phpfreaks.com/topic/263618-percentage-value/#findComment-1351038 Share on other sites More sharing options...
Illusion Posted June 4, 2012 Share Posted June 4, 2012 SELECT ROUND(99.9999,2) outputs 99.99 Link to comment https://forums.phpfreaks.com/topic/263618-percentage-value/#findComment-1351076 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.