How do I calculate percentages with decimals in SQL?
convert(decimal(5,2),(100 * convert(float,[TotalVisit1])/convert(float,[TotalVisits]))) AS Visit1percent
Ugly, but it works.
Try This:
(100.0 * [TotalVisit1]/[TotalVisits]) AS Visit1percent
convert(decimal(5,2),(100 * convert(float,[TotalVisit1])/convert(float,[TotalVisits]))) AS Visit1percent
Ugly, but it works.
Try This:
(100.0 * [TotalVisit1]/[TotalVisits]) AS Visit1percent