【发布时间】:2013-08-02 22:07:09
【问题描述】:
我正在尝试使用 LIKE 语法在 iReport 中编写 SQL 查询。
我用以下方式编写查询:
... AND voc_agent.id LIKE '%$P!{LABEL}%'
这是有效的。但知道我想检查 NULL 上的 P{LABEL}
我写了
... $P!{LABELL}
$P!{LABELL} = ($P!{LABEL}==null? "" :"AND voc_agent.id LIKE '%" + $P{LABEL}+ "%'")
结果是:
Error filling print... Error evaluating expression : Source text : ($P{LABEL} == null ? "" : "AND voc_agent_commercial_terms.label LIKE '%" + $P{LABEL} + "%'")
我做错了什么?
【问题讨论】:
-
你用的是什么数据库?
标签: jasper-reports