Interesting Data Type Problem
The following query returns .038461 as it should:
select (2.0 + 0.0 + 0.0)/52 as x
However, when the numeric literals are replaced by either variables or field names the result is completely different. The query below returns 3.8461538461538464E-2.
declare @a float, @b float, @c float
set @a = 2.0
set @b = 0.0
set @c = 0.0
select (@a + @b + @c)/52
Does anyone know why???????
Thanks,
DL
|