我已经在不同的地方看到过这个问题的讨论,但还没有看到这个错误的实际解决方案或解释。我无法弄清楚是什么导致了错误,我的查询独立运行良好,并且该报告按原样运行良好,或者进行了一些非常小的更改。
SELECT wo.wonum, wo.worktype, wo.description wo_description, wo.targcompdate, wo.assetnum, wo.estlabhrs, wo.actlabhrs, wo.actfinish, s.siteid, s.description s_description, round((wo.targcompdate - sysdate), 0) DaysTillDue
FROM workorder wo
INNER JOIN site s on wo.siteid = s.siteid
WHERE
wo.istask = '0'
and wo.status in ('APPR','INPRG','WAPPR','WMATL','WSCH','APPR''EVALUATED','INPRG','ISOLATED','WAPPR','WMATL' ,'WSCH','APPR','EVALUATED','INPRG', 'ISOLATED','WAPPR','WMATL','WSCH','APPR','EVALUATED','INPRG','ISOLATED','WAPPR','WMATL','WS CH','WWAP')
and wo.siteid = :site_param
and (:worktype_param is NULL or wo.worktype = :worktype_param)
and ((
(:High_Day is NULL or ( (wo.targcompdate - sysdate) <= :High_Day))
and (:start_date is NULL or targcompdate >= :start_date)
and (:end_date is NULL or targcompdate <= :end_date))
or targcompdate is NULL)
:worktype_param 和 :site_param 是从其他数据集中提取的,并显示为下拉列表。
提前致谢。