Maximo Open Forum

 View Only

 Where Clause - Work Order Tracking to capture specific crafts

  • Everything Maximo
  • Maximo Application Suite
  • Work Management
Rob Heeney's profile image
Rob Heeney posted 05-01-2025 02:19

Hi all

Im trying to structure a statement that will return specific crafts held on an assignment. This is what i have so far but unfortunately errors.

historyflag=0 and istask=0  and exists(select 1 from assignment where assignment.wonum=workorder.wonum and assignment.siteid=workorder.siteid and assignment.craft in

('AC', 'ACCH', 'AIR', 'BOAS', 'CARP', 'CLEANING', 'CLIMB', 'CONTROLS', 'CUTOVER', 'DOORF', 'DOORS', 'DRAIN', 'ELEC', 'EML', 'ENERGY', 'FAB', 'FACM', 'FIRESEC', 'FRA', 'GAS', 'INSP', 'L8', 'LANDS', 'LEV', 'MCH', 'NONE', 'OIL', 'PAINT', 'PAT', 'PEST', 'PLB', 'PORT', 'POST', 'PRESS', 'PROD', 'ROOF', 'SEC', 'SOCTECH', 'SUBDOOR', 'SUBDUCT', 'SUPPLYON', 'TCOMMS', 'WASTE', 'WATER', 'WATERSP', 'WRA')

and status in ('ASSIGNED', 'APPR', 'INPRG')

and pluspcustomer in ('MC0000DLFT', 'A003B8026')

Any support would be greatly appreciated.

Thankyou

Rob

Stevie Holloway's profile image
Stevie Holloway

Hi Rob,

Try this:

historyflag=0 and istask=0  and exists(select 1 from assignment where wonum=workorder.wonum and siteid=workorder.siteid 
and assignment.craft IN ('AC', 'ACCH', 'AIR', 'BOAS', 'CARP', 'CLEANING', 'CLIMB', 'CONTROLS', 'CUTOVER', 'DOORF', 'DOORS',
 'DRAIN', 'ELEC', 'EML', 'ENERGY', 'FAB', 'FACM', 'FIRESEC', 'FRA', 'GAS', 'INSP', 'L8', 'LANDS',
 'LEV', 'MCH', 'NONE', 'OIL', 'PAINT', 'PAT', 'PEST', 'PLB', 'PORT', 'POST', 'PRESS', 'PROD', 'ROOF',
 'SEC', 'SOCTECH', 'SUBDOOR', 'SUBDUCT', 'SUPPLYON', 'TCOMMS', 'WASTE', 'WATER', 'WATERSP', 'WRA'))
and status in ('ASSIGNED', 'APPR', 'INPRG') 
and pluspcustomer in ('MC0000DLFT', 'A003B8026')

I know it works through the status in, but I don't have PLUSPCUSTOMER