Maximo Open Forum

 View Only
  • 1.  Search workorder records not inserted in woancestor through query

    Posted 11-01-2022 11:54
    Edited by Joe Kelley 09-07-2023 17:34
    Does anyone have query to find the missing records of woancestor table that are present in workorder but its entry is not made woancestor table by system.

    #WorkManagement

    ------------------------------
    Ramesh Kumar
    student
    ------------------------------


  • 2.  RE: Search workorder records not inserted in woancestor through query

    Posted 11-21-2022 10:29
    SELECT wonum 
    FROM workorder 
    WHERE wonum NOT IN (SELECT wonum FROM woancestor)​

    Is that what you are asking for?



    ------------------------------
    Travis Herron
    Pensacola Christian College
    ------------------------------



  • 3.  RE: Search workorder records not inserted in woancestor through query

    Posted 05-10-2023 20:06

    Hi Travis,

    There is a flaw in your query.  The WORKORDER object exists at the site level.  So, the work order number could be repeated in each site.  You need to involve the SITEID.  I generally find an EXISTS or in this case, a NOT EXISTS statement is much less costly and is faster, but just crafting the SQL statement to involve the fields involved in an index will also be faster.  I've included a version here.


    SELECT wonum

    FROM WORKORDER w

    WHERE NOT EXISTS

    (SELECT 1 FROM WOANCESTOR w2

    WHERE w2.wonum = w.WONUM

    AND w2.SITEID = w.SITEID );



    ------------------------------
    Regards,
    Craig Kokay
    ISW
    Maximo Practice Manager
    eMail: ckokay@isw.net.au
    Phone: +61-411-682-040

    #IBMChampion2023
    ------------------------------



  • 4.  RE: Search workorder records not inserted in woancestor through query

    Posted 07-11-2023 19:56

    I believe Integrity Checker will also report these.  It might be a good idea to run this in case there are other issues lurking.  I don't recall if it lists the workorders, but you can see the SQL used in the log. 😊



    ------------------------------
    Steven Hauptman
    IBM
    ------------------------------



Featured Podcast
Episode 1 is live: IBM Maximo Application Suite 9.2

Watch or listen to Steven Shull and Phil Runion discuss the practical MAS 9.2 updates Maximo teams should know.

Watch the Podcast
MORE by Naviam Episode 1 cover
Watch the latest episode