select convert(varchar(200),cast(SumRMB as money),1) as 人民币总额 from #temp
把你的SQL升级算了!迟早都要做的事情
to qizhanfeng(glacier):错误一样
sql server 7 没问题呀create table #temp(SumRMB money DEFAULT(0)) delete #temp insert into #temp select 5455551.253 union select 2545487.36 union select 63535.3666 select convert(varchar,cast(SumRMB as money),1) as 人民币总额 from #temp--没问题呀 select convert(varchar,SumRMB ,1) as 人民币总额 from #temp--这也对呀 --结果人民币总额 ------------------------------ 63,535.37 5,455,551.25 2,545,487.36(所影响的行数为 3 行)
delete #temp
insert into #temp select 5455551.253
union select 2545487.36
union select 63535.3666
select convert(varchar,cast(SumRMB as money),1) as 人民币总额 from #temp--没问题呀
select convert(varchar,SumRMB ,1) as 人民币总额 from #temp--这也对呀
--结果人民币总额
------------------------------
63,535.37
5,455,551.25
2,545,487.36(所影响的行数为 3 行)