I am trying to create a where clause to return all work orders between set dates where the there are no ACTUALS recorded (no labtrans). I have an existing WC which i am using as a template for this one but i am stuck with the “where” element.
(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?
Many Thanks,
G
Advertisement
Answer
The easy way, trusting that the rest of Maximo has done its job like it normally does, would be something like the following. (I’m going from memory. You can double-check the column names on the WORKORDER object / table in Database Configuration or in your database browser tool, like 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