Reputation: 693
If I run this query in SSMS:
select convert(decimal(18,2),1.1), convert(real,1.1)
I will get two different decimal points, "1.10" and "1,1".
With my current locale/regional settings, I would expect ,
to be used as decimal point for both cases.
Why is SQL Server (or SQL Server Management Studio?) formatting decimals and real numbers in a different way? Is there any way things can be configures to get this right?
Of course, in my code, I get the correct datatypes and can display the correct decimal point, but when running a select on tables with real and decimal datatypes, I get this mixed use of decimal points, so It's kinda tedious to paste into Excel. In earlier versions of SSMS/query analyzer this was not a problem, but now it is?
Upvotes: 1
Views: 496
Reputation: 15150
This is a documented bug.
See this for the original bug report, and this for the follow up. It doesn't look like MS is going to fix this (soon).
I am surprised you see a difference between SSMS versions though.
Upvotes: 5