You want SQL Server to perform floating point division rather than integer division. If you use literal values, as in your example, the denominator suffix is ββwith .0 to force SQL Server to treat it as a floating point value.
SELECT 100 / 15.0
Otherwise, make sure you specify your variables as FLOAT .
source share