Check Your regional setting in the Control panel. I think its the problem with that.
SSMS float and decimal presentation
-
31-05-2022 - |
Question
I'm having a little bit of trouble understanding output format in SSMS.
Tablea:
- fielda = float
- fieldb = decimal(18,6)
SQL:
select
sum(cast(fielda as decimal(18,6))) a,
sum(fieldb) b
from tablea
Result in Grid, text:
a b
-4208.370000 -4208,37
-2945.830000 -2945,83
31547.610000 31547,61
So float = ',', decimal = '.'
Is this a regional setting(local), SSMS setting(app) or database?
The last does not seem to be the case, the result differs per location(pc). I asume that both float and decimal can be considered a 'number', so regional setting seems odd. And any any SSMS setting is not know to me.
Is there a way to fix this? And how to fix this(=same result)?
SSMS 10
PC Regional settings NL
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow