【问题标题】:Crystal Reports select statement helpCrystal Reports 选择语句帮助
【发布时间】:2010-12-07 17:28:39
【问题描述】:

我正在尝试添加 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'

【问题讨论】:

  • 为什么这被标记为水晶报告?这是 .rpt 的数据源命令吗?

标签: crystal-reports crystal-reports-8.5


【解决方案1】:
    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”?

不确定这里要问什么。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-01
    • 2016-10-03
    相关资源
    最近更新 更多