SQL Where 子句 Maximo IBM

SQL Where Clause Maximo IBM

我想在 Maximo 中创建一个 where 子句。 我们今天有一个条款,我们可以在其中看到即将违反已响应 SLA​​ 的工作订单。

但我希望该条款计算显示工作订单将在 1 小时内违反响应的 SLA。 这可能吗?

条款如下:

(woclass = 'WORKORDER' or woclass = 'ACTIVITY') 
and historyflag = 0 
and istask = 0 
and workorderid in (select sla.ownerid from slarecords sla where sla.ownertable = 'WORKORDER' and sla.ownerid = workorderid)
and wonum not in (select wos.wonum from wostatus wos where wos.status = 'RESPONDED' and wos.siteid = siteid and wos.wonum = wonum)
and sysdate < targstartdate
and (((targstartdate - reportdate) - (targstartdate - sysdate))/(targstartdate - reportdate)*100)>90
and (siteid in (select defsite from maxuser mu where mu.sdx_siteteam is null and mu.userid =  'ALEXANDER.JEPPSON@SODEXO.COM' )
or (siteid in (select sis.siteid from sdx_integratedsites sis where sis.sdx_property = 'COMMANDCENTER' and sis.sdx_type = (select sdx_siteteam from maxuser mu where mu.userid =  'ALEXANDER.JEPPSON@SODEXO.COM' ))))

听起来你应该改变

and sysdate < targstartdate

从目标中减去一个小时

and sysdate < targstartdate - 1/24

或在当前时间基础上加一小时

and sysdate + 1/24 < targstartdate