Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  SDM - Query Validations

    Posted Thu August 13, 2020 11:35 AM
    Graphical Work Week allows copying of Saved Queries from WOTRACK but the same query that runs in WOTRACK (or in Oracle SQL Developer) does not run in GWW without modifications.  

    Currently, I am getting an unknown error.

    When reviewing the query in SDM (which is great btw), I see 2 warnings which are a bit lacking in explanation.
    Error/Warning Description Fix Option
    QUERYHISTORY history is added  by Scheduler  and if  added in the query  could be a performance  issue Return  to original  schedule and  make changes to the query
    RESTRICTDATES Consider using restrict work  to dates Return  to original  schedule and  make changes to the query

    QUERYHISTORY - the sql restricted with a historyflag = 0 
    RESTRICTDATES - the sql limited the retrieval of work to about 6 weeks

    The query runs fine in WOTRACK Where Clause and in a select in Oracle developer.

    siteid = 'AFS'
    and historyflag=0
    and status not in ('WAPPR','ENTPLNG','PLNG', 'PLND','COMP', 'PENDCAN', 'PENDCLOSE')
    and worktype not in ('AD')
    and srp_ucr in ('1', '2', '3')
    and ((schedstart is not null and (schedstart < (trunc(sysdate, 'iw') + 42 - 1/86400)))
    or (pmnum is not null
    and schedstart is null
    and (targstartdate <(trunc(sysdate, 'iw') + 42 - 1/86400))))

    An expansion on the meaning of these 2 Warnings (or any of the other 5 ERROR/WARNIING) and guidance on what to look for when Copying and modifying WOTRACK queries to run in Graphical Work Week would be greatly appreciated.

    Thanks,

    ------------------------------
    Orin Huey
    SRP
    AZ
    ------------------------------



    #AssetandFacilitiesManagement
    #Maximo
    #MaximoScheduler


  • 2.  RE: SDM - Query Validations

    Posted Thu August 13, 2020 06:42 PM
    I am no longer getting an unknown error, only the Warning messages.

    I eliminated the unknown error in GWW by removing the formatting within the where clause reverting to the run on sentence format.  

    siteid = 'AFS' and historyflag=0 and status not in ('WAPPR','ENTPLNG','PLNG', 'PLND','COMP', 'PENDCAN', 'PENDCLOSE') and worktype not in ('AD') and srp_ucr in ('1', '2', '3') and ((schedstart is not null and (schedstart < (trunc(sysdate, 'iw') + 42 - 1/86400))) or (pmnum is not null and schedstart is null and (targstartdate <(trunc(sysdate, 'iw') + 42 - 1/86400))))




    ------------------------------
    Orin Huey
    SRP
    AZ
    ------------------------------



  • 3.  RE: SDM - Query Validations

    Posted Fri August 14, 2020 09:35 AM
    Orin,
    The first message "history is added  by Scheduler  and if  added in the query  could be a performance  issue" is because your query has 'historyflag=0' in the query which can be removed. Scheduler is adding 'historyflag=0'  and 'istask=0' behind the scenes and the error message is simply trying to tell you to remove it as it is being duplicated.

    The second message is likely telling you to set 'Restrict Work to Dates' versus using the data filter in your query as you have "(targstartdate <(trunc(sysdate, 'iw') + 42 - 1/86400))))" as an example. The Restrict Work to Dates doing something similar.  

    The reason you probably can;'t use this query in GWW is because of your date restrictions. I would take them out as GWW looks at the current week I believe out of the box. You query would look something like

    siteid = 'AFS'
    and status not in ('WAPPR','ENTPLNG','PLNG', 'PLND','COMP', 'PENDCAN', 'PENDCLOSE')
    and worktype not in ('AD')
    and srp_ucr in ('1', '2', '3')
    or (pmnum is not null)


    Mike


    logo

    Michael Marsonet
    Senior Manager | View My Certifications

    t: (905) 264-3443 x501
    m: (416) 522-2986


    Create Purchase Requisitions Without Leaving Maximo 

     






  • 4.  RE: SDM - Query Validations

    Posted Fri August 14, 2020 09:41 AM
    One Additional note - Graphical Work Week always restricts the work to the dates of the work list, following the general rules (Sched dates if exist, Targ dates if they exist).  Therefore adding additional date restrictions will not be of much value.  There is a flag to bring in work without any dates.  This is a change from all other Scheduler applications.

    ------------------------------
    Lori Pilgrim
    Maximo Design/Architect IBM
    ------------------------------