Crystal Reports select 语句帮助
我正在尝试添加 MV_AgeBased 和 MV_FeeInLieu 列,但是某些列在数据库中可能为 null 或为空,这会导致该 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'
I'm attempting to add the MV_AgeBased and the MV_FeeInLieu columns, however some of the columns may have null or empty in the db, this results in bringing back zeroes for that CodeEntity. Any suggestions?
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'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为所有可能为空的列添加“WHERE [column] is not null”?
不太确定这里要问什么。
Add "WHERE [column] is not null" for all the potentially null columns?
Not absolutely sure what is being asked, here.