我想在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' ))))
答案 0 :(得分:2)
听起来你应该改变
and sysdate < targstartdate
从目标中减去一个小时
and sysdate < targstartdate - 1/24
或在当前时间增加一个小时
and sysdate + 1/24 < targstartdate