The sript below returns the percentage of a certain product from my Products table.
I would like to display the percentage with two decimals. How can this script be modified in order to achieve that.
Thank you for your help.
Set sqlCount = Server.CreateObject("ADODB.Command")
sqlCount.Prepared = true
sqlCount.CommandText = "SELECT ( count( id ) * 100 / ( SELECT count( * ) FROM Products ) ) as avg FROM Products WHERE myProduct='Beer'"
set objRs = sqlCount.Execute
CountID = objRs("avg")
Set ObjRs = Nothing