带逗号和句点的 SQL Server 2005 货币格式 [英] SQL Server 2005 Currency Format with comma's and period
本文介绍了带逗号和句点的 SQL Server 2005 货币格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在 SQL Server 2005 中转换货币字段以对其进行格式化
Is there a way to cast a money field in SQL Server 2005 to format it
例如)该字段包含:
99966.00
我们希望以这种格式返回:$99,966.00
and we want to return it in this format: $99,966.00
推荐答案
'$' + convert(varchar,cast(SalesProducts.Price as money),-1) as Price
这有效
这篇关于带逗号和句点的 SQL Server 2005 货币格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文