CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Sum percentages

Print topic Send  topic

Author Message
Jerry
Posted: 07/23/2003, 5:30 AM

I am using the following sql statement to gain the results of a survey and would like to convert the figure into a percentage

review = table
organise = column

Select Count(organised) AS Label1 From review Where organised = 1
It Farmer
Posted: 07/23/2003, 4:49 PM

([CountOfColumn1]/[CountOfColumn2])* 100 AS PERCENTAGE

Fore example i want to know the % of black cats in my database.
CountOfColumn1 = total counts where black cats
CountOfColumn2 = total records in the database
This returns a 0.xx value if done correctly. Multiply this by 100 (*100) and you get the full percentage.

Hope this helps.



   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.