If statement if条件与反增量

If statement if条件与反增量,if-statement,counter,conditional-statements,increment,If Statement,Counter,Conditional Statements,Increment,这个if条件有什么问题 if ((@rent_amt_h <> '0.000') or (@house_payment_amt_h <> '0.000') or (@insurance_amt_h <> '0.000')or (@property_taxes_amt_h <> '0.000') or (@gas_amt_u <> '0.000') or (@elec_amt_u <> '0.000') or (@oth

这个if条件有什么问题

  if ((@rent_amt_h <> '0.000') or (@house_payment_amt_h <> '0.000') or (@insurance_amt_h <> '0.000')or (@property_taxes_amt_h <> '0.000') or  (@gas_amt_u <> '0.000') or (@elec_amt_u <> '0.000') or (@otherfuel_amt_u <> '0.000') or (@Trash_Collection_amt_u <> '0.000') or (@Sewerage_amt_u <> '0.000') or (@Telephone_amt_u <> '0.000') or (@water_amt_u <> '0.000') or (@other_house_amt_h <> '0.000') or (@other_amt_u <> '0.000') or (@total_u <> '0.000'))

                           begin
                 SET @APPSHELTER_COUNT  =  (select Count(APP_ID) FROM ext_app_group_other_expenses (nolock)  WHERE APP_ID = @App_Id )
               end
               else
               begin
                 SET @APPSHELTER_COUNT  =  0
               end
它会增加@apphounder\u计数值,即使if条件中的值为零也是如此!。它从不将值设置为0


谢谢你的帮助。

那是什么语言?不管怎么说,这感觉就像是在比较数字和字符串。尝试删除零周围的引号。例如@rent\u amt\u h 0而不是@rent\u amt\u h“0.000”。另外,如果这是一些SQL,请确保正确处理,因为NULL!=0.

您的if语句中有14个条款-这很难阅读,也不可能理解maintain@userstackoverflow:任何时间: