IBM Maximo Where 子句

IBM Maximo Where Clause

我正在尝试为 return 设置日期之间没有实际记录(没有 labtrans)的所有工作订单创建一个 where 子句。我有一个现有的 WC,我将其用作此模板,但我坚持使用 "where" 元素。

(woclass = 'WORKORDER' or woclass = 'ACTIVITY') and
istask = 0 and
worktype = 'PPM' and *This could be removed*
targcompdate >= { ts '2020-05-01 00:00:00.000' } and
targcompdate >= { ts '2020-05-05 00:00:00.000' } and
not exists?? there are no actuals are on the work order?

非常感谢,

G

相信 Maximo 的其余部分已像往常一样完成其工作的简单方法如下所示。 (我靠记忆。您可以在数据库配置或数据库浏览器工具中仔细检查 WORKORDER 对象 / table 上的列名,例如 SQL Developer。)

(woclass = 'WORKORDER' or woclass = 'ACTIVITY') and
istask = 0 and
worktype = 'PPM' and *This could be removed*
targcompdate >= { ts '2020-05-01 00:00:00.000' } and
targcompdate >= { ts '2020-05-05 00:00:00.000' } and
actlabcost = 0 and
actmatcost = 0 and
actservcost = 0 and
acttoolcost = 0

这对我有用:

(woclass = 'WORKORDER' or woclass = 'ACTIVITY') and 
(targcompdate between '2020-05-01' and '2020-05-05' and historyflag = 0 and istask = 0) 
and not exists(select 1 from labtrans where refwo=workorder.wonum and siteid=workorder.siteid)