【发布时间】:2020-02-07 04:22:25
【问题描述】:
select
ic.item_name,
lh.locn_brcd from_locn,
lh2.locn_brcd to_locn,
wl.from_container,
wl.to_container,
wl.units,
wl.prev_from_container_status prev_from_lpn_status,
wl.curr_from_container_status curr_from_lpn_status,
wl.prev_to_container_status prev_to_lpn_status,
wl.curr_to_container_status curr_to_lpn_status,
wl.work_batch_number,
wl.transaction_name,
wl.action,
wl.work_id,
wl.date_updated,
wl.source_updated,
wl.tote_number,
wl.chute
from m_work_log wl
LEFT join item_cbo ic on wl.item_id=ic.item_id
left join locn_hdr lh on wl.from_location_id = lh.locn_id
left join locn_hdr lh2 on wl.to_location_id = lh2.locn_id
where wl.action in (:action)
and trunc(wl.date_updated) between :start_date and :end_date
and (ic.item_name in (:list) OR
wl.source_updated = :username OR
wl.to_container in (:LPNList) OR
(:list is null and :username is null and :LPNList is null)
)
order by date_updated desc
大家好,
当我通过 Oracle SQL Developer 运行此代码并将两个项目添加到 :list 参数和两个项目到 :action 参数时,它工作正常。但是当我通过 SSRS(报告生成器)运行它时,它无法运行并且我得到一个“ORA-00920:无效的关系运算符”。我是 SQL 新手,我不确定我在这里做错了什么。任何帮助是极大的赞赏。谢谢!
【问题讨论】:
标签: sql oracle reporting-services