I'm trying to make a calculation through SQL code but this is resulting in a 0.
declare @activities as integer
declare @days as integer
declare @media as float
--my queries that extracts data and sets values to @days, @activities; in this case they return @activities=51 and @days=199
set @media = @activities/@days
select @days as Days,@activities as Acts, @media as Media
and this results in
Days - Acts - Media
199 51 0
Why this result, instead of 0,25628140703517587939698492462312 ?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!