joey6401c (11/19/2013)
Hey,Thanks for the reply. All I am trying to do is return a compliance percentage of @compliant/@total and I want to return a percentage with 2 decimal places if possible so 98.97 let's say
I don't need the % in there I just want to return the percent with two decimal places or more
Do you know a query i can use for that?
Just change this line:
declare @percent int
to
declare @percent decimal(4,2)
or
declare @percent decimal(5,2)
if you think you may get 100.00 back at some point. (4,2) will error on you if it returns 100 or larger.