This command is working on some SQL Server databases, but not on others.
select Cast(Cast(DateDiff(mm,'20110608','20110708') as decimal(5,2))/12 as decimal(5,2))
It either returns this error
Arithmetic overflow error converting numeric to data type numeric.
or works and returns:
0.08
Is there any settings I should change on the database?
solved it by setting: