I am trying to do this:
declare @percent int, @convertedpercent int
set @percent = 5
select @percent
select cast(@percent/100 as decimal(5,2) )
(it's part of a bigger SP, but that's essentially where my problem is lying)
All I am looking for is the result to read accurately
5/100 = .05
when I execute this in QA, I get 0.0
I also tried:
set @convertedpercent = @percent/100
Don't know what I'm missing, not really all that familiar with the nuances of SQL Server
Thanks in advance for any help
declare @percent int, @convertedpercent int
set @percent = 5
select @percent
select cast(@percent/100 as decimal(5,2) )
(it's part of a bigger SP, but that's essentially where my problem is lying)
All I am looking for is the result to read accurately
5/100 = .05
when I execute this in QA, I get 0.0
I also tried:
set @convertedpercent = @percent/100
Don't know what I'm missing, not really all that familiar with the nuances of SQL Server
Thanks in advance for any help