-1

Can somebody help me in converting below mentioned query in to Maximo's where clause:

select distinct workorder.wonum from workorder inner join [assignment] On workorder.wonum=[assignment].wonum inner join amcrew On amcrew.amcrew=[assignment].amcrew inner join amcrewlabor On amcrewlabor.amcrew=amcrew.amcrew inner join labor On amcrewlabor.laborcode=labor.laborcode inner join person on labor.laborcode=person.personid where amcrewlabor.laborcode='KELLYB'

  • KELLYB is PERSONID used here for just reference.

1 Answers1

1

If you are using a custom search query in Maximo, you can try prepending your with in (your query)

For example, if you're in Maximo's work order tracking module, the application uses select * from workorder by default. Any time you add a search filter such as work order number (wonum), then the query appends to run a query as select * from workorder where wonum = '123' if 123 is the work order number you entered.

enter image description here

Your where clause might look something like this:

wonum in (
select distinct workorder.wonum 
from workorder  
join assignment on workorder.wonum=assignment.wonum
join amcrew on amcrew.amcrew=assignment.amcrew 
join amcrewlabor on amcrewlabor.amcrew=amcrew.amcrew
join labor on amcrewlabor.laborcode=labor.laborcode
join person on labor.laborcode=person.personid
where amcrewlabor.laborcode='KELLYB'
)

The SQL that is generated in Microsoft Access will not necessarily work in Maximo without some modification.

Sun
  • 2,595
  • 1
  • 26
  • 43