Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 使用正确的小数分隔符将浮点数转换为 varchar
当我运行时:select convert(float, 10.12), convert(decimal(5, 2), 10.12) 我得到这个结果:
select convert(float, 10.12), convert(decimal(5, 2), 10.12)
(No column name) (No column name) 10,12 10.12
为什么会这样?我来自巴西,我的 Windows 语言设置为葡萄牙语,但不应该同时返回十进制和浮点数“。” 或“,”同时?
我不确定这是否是问题所在,但它似乎是 SSMS 中的格式错误。它对浮点数和货币使用 OS 区域设置,但对十进制不使用。
http://connect.microsoft.com/SQLServer/feedback/details/458416/microsoft-sql-server-management-studio-doesnt-get-os-regional-setting