HI there. I have been working on a query that when you select a workorder from the WPLABOR table, it will display all the planned labor including the Planned labor associated to the task work orders. I can do this like Maximo does with an imbedded query, but I need to return the plan labor craft, skills description and the quantity.
Any thoughts would be appreciated. Thanks
I'm sure I'm either missing something or approaching this incorrectly. Here is an example of what I'm trying to do.
select * from maximo.wplabor where
wonum in (select a.wonum from maximo.workorder a, MAXIMO.WPLABOR b where (a.wonum=b.wonum or (a.parent=b.wonum and a.istask = 1)))
and wonum = '<My WONUM>
***This will work, but I don't want the WONUM imbedded in the in statement***
select * from maximo.wplabor where
wonum in (select wonum from maximo.woancestor where ancestor = <MY WONUM>)
select * from maximo.wplabor where
(wonum=<MY WONUM> or exists (select 1 from maximo.workorder w where w.parent=<MY WONUM>
and w.istask=1 and wplabor.siteid=w.siteid and wplabor.wonum=w.wonum)) and wplabor.siteid='NTS'
#Administration------------------------------
Brian Swanson
MSTS (Mission Support & Testing Services)
------------------------------