i'm using the following code to divide two number but i want my result to be instead of a whole number but a decimal. 167 / 25 = 6.68. when i use the following it gives me only 6.
convert(decimal,case when DaysWorked = 0 then 0 else ((TotalHours/60/60) / DaysWorked end,2) as AverageLaborHours
TotalHours and DaysWorked are both integers.
TotalHours is in seconds. that is why i'm dividing it by 60 twice to get the 167.