Hi i'm living in austria and we use the ,
as decimal separator.
It seems to be impossible to convert the float to varchar with the correct separator according to the language/collation setting?
Is this a bug?
set language german --makes no difference in this case
declare @f float = 4.5
select @f --output in my management studio is 4,5
--according to the regional os settings this is correct
select convert(varchar,@f) -- output: 4.5 not correct
one solution, but not ideal I think
select replace(convert(varchar,@f),'.',',')
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…