嗨,我住在奥地利,我们使用,作为小数分隔符.
根据语言/整理设置,似乎无法使用正确的分隔符将float转换为varchar?
这是一个错误吗?
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
一个解决方案,但我认为并不理想
select replace(convert(varchar,@f),'.',',')