We have changed the SQL Server compatibility from 100 to 130 the below code in our stored procedure behaves differently:
DECLARE @i decimal(4, 0) = 1,
@j decimal(4, 1) = 0.5
SELECT SUM(@i) - SUM(@j)
Result of the select:
- Compatibility Level 100: 0
- Compatibility Level 130: 1
We are not sure how many calculation we have in our code like this.
Is there any setting in the SQL Server database we can make to work same as compatibility level 100?