如何在选择小数(18,2)中添加逗号?

时间:2014-06-26 17:00:22

标签: sql-server-2012

我基本上正在尝试正确格式化sql以显示为金钱。这就是我所拥有的,但我不能让逗号出现!

SELECT '$' + CONVERT ( NVARCHAR (30), CONVERT (NUMERIC (30, 2), round (CONVERT (MONEY, 321321321.321231), 2))) AS 'Accrued'

1 个答案:

答案 0 :(得分:1)

SELECT '$' + CONVERT(varchar(max), CAST(321321321.321231 AS money), 1)