2 Replies Latest reply on Feb 16, 2017 8:27 AM by GreggSmith

    trying to find minimum value for

    SurabhiSingh Rookie

      I am trying to find a minimum value for QUEUED status.

      Example: If a ticket is QUEUED for 4 times I need to get the value for the first it was QUEUED i.e. I need to get the minimum change date for the ticket QUEUED.

      I  have tried using the query "(SELECT MIN (CHANGEDATE) AS CHANGEDATE , TICKETID FROM MAXIMO.TKSTATUS WHERE STATUS = 'QUEUED' GROUP BY TICKETID)"

      I have added a new table in the data model as"STATUS_HISTORY_NEW" and have used the above query. Have used left outer join still not able to get the reports.

      Our database is Oracle.

      below is the screenshot of data model.

        • 1. Re: trying to find minimum value for
          fahussain Apprentice

          Hi Surabhi,

           

          if we set aside Xtraction for a minute. did you achieve the value when you query your database ?

           

           

           

          regards

           

          farooq    

          • 2. Re: trying to find minimum value for
            GreggSmith SupportEmployee

            The structure of the nested select appears correct.  It is covered up in your screenshot, but when using nested selects as "tables" in Xtraction, you MUST leave the Schema property blank.

             

            Everything you described appears to be correct/complete.  Are you receiving any errors?  If so, posting the error will help identify the problem.

            Is there no error, but the resulting value just comes back blank?  That might indicate joining on the wrong field(s).

             

            You can also open a support ticket.  I would suggest uploading a copy of your data model file to the ticket.  If the support person can't identify the problem, ask them to have me take a look at it.