0

我正在尝试添加 MV_AgeBased 和 MV_FeeInLieu 列,但是数据库中的某些列可能为空或为空,这会导致该 CodeEntity 恢复为零。有什么建议么?

        SELECT "AuditorYearEnd"."PP_MH_Pri", "AuditorYearEnd"."PP_MH_Other", 
"County"."Name", "AuditorYearEnd"."TOTAL_Personal_calc", 
"AuditorYearEnd"."PP_BusPersonal", "AuditorYearEnd"."TaxYr", 
"AuditorYearEnd"."CodeEntity", "AuditorYearEnd"."MV_AgeBased", 
"AuditorYearEnd"."MV_FeeInLieu"
     FROM   "txctr"."dbo"."AuditorYearEnd" "AuditorYearEnd" 
INNER JOIN "txctr"."dbo"."County" "County" ON "AuditorYearEnd"."CodeCounty"="County"."CodeCounty"
     WHERE  "AuditorYearEnd"."TaxYr"=2010 AND "AuditorYearEnd"."CodeEntity"='1010'
4

1 回答 1

0
    SELECT "AuditorYearEnd"."PP_MH_Pri", "AuditorYearEnd"."PP_MH_Other", 
"County"."Name", "AuditorYearEnd"."TOTAL_Personal_calc", 
"AuditorYearEnd"."PP_BusPersonal", "AuditorYearEnd"."TaxYr", 
"AuditorYearEnd"."CodeEntity", "AuditorYearEnd"."MV_AgeBased", 
"AuditorYearEnd"."MV_FeeInLieu"
 FROM   ("txctr"."dbo"."AuditorYearEnd" "AuditorYearEnd" 
INNER JOIN "txctr"."dbo"."County" "County" ON "AuditorYearEnd"."CodeCounty"="County"."CodeCounty"
 WHERE  "AuditorYearEnd"."TaxYr"=2010 AND "AuditorYearEnd"."CodeEntity"='1010')

为所有可能为空的列添加“WHERE [column] is not null”?

不完全确定这里问的是什么。

于 2010-12-07T09:28:39.753 回答