Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to display Percentage instead of Record Count?

Avatar of baxtalo
baxtalo asked on
13 Comments1 Solution340 ViewsLast Modified:

Instead of the number of occurances where the camera was not working in the store I'd like to display the percentage. Would anyone please help me with this?
I need the percentage not the record count.
Thank you

Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("StoreWatch.mdb") & ";"

Set sqlCount = Server.CreateObject("ADODB.Command")
sqlCount.Prepared = true
sqlCount.CommandText = "SELECT Count(id) AS Countid FROM StoreWatch_Table where Camera = 'No'"
set objRs = sqlCount.Execute
CountID = int(objRs("CountID"))
Set ObjRs = Nothing