
1个回答
展开全部
--在查询语句改动一下就OK啊
declare @table table (id int ,test decimal(20,1))
insert into @table values(1,0.0)
insert into @table values(2,100.535)
insert into @table values(3,0.561)
select case when cast(test as varchar(20)) = '0.0' then '-' else cast(test as varchar(20)) end from @table
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |