当钱为零时,我需要排除查询中的情况。我已经尝试了一切:
money <> 0.00
money != 0.00
money <> 0
money != 0
cast (money as int) <> 0
cast (money as int) != 0
cast (money as varchar) <> ''
cast (money as varchar) != ''
当钱为零时,他们都没有捕捉到的情况。有什么想法吗?
答案 0 :(得分:0)
我最好猜测你需要什么:
Case when money = 0 then '' else money end
更多阅读:http://technet.microsoft.com/en-us/library/ms181765.aspx