Reputation: 25
I want to create a where clause in Maximo. We have a clause today where we can see the work order about to breach responded SLA.
But i want the clause to calculate to show work order about to breach responded SLA within 1 hour. Is that possible?
Clause is as follows:
(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 = '[email protected]' )
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 = '[email protected]' ))))
Upvotes: 2
Views: 742
Reputation: 2145
It sounds like you should change
and sysdate < targstartdate
to subtract an hour from the target
and sysdate < targstartdate - 1/24
or add an hour to the current time
and sysdate + 1/24 < targstartdate
Upvotes: 4