当钱为零时,我需要在查询中排除情况。我已经尝试了一切:
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) != ''
他们都没有抓住钱为零的情况。有任何想法吗?
我对您需要什么的最佳猜测:
Case when money = 0 then '' else money end
更多阅读:http ://technet.microsoft.com/en-us/library/ms181765.aspx