SQL query to list all of work units in Rich Client

 6 Replies
 2 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
HDAustin13
Advanced Member
Posts: 31
Advanced Member
    Hello All, I need to write a sql query to list of all work units that have been ran on the system (those that are shown in the Work Units, Rich Client tool) including all status of Completed, Failed, Cancelled, etc. Can any one please advise which database tables that I can use for this query? Thanks in advance. Han
    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      PfiWorkunit
      David Williams
      HDAustin13
      Advanced Member
      Posts: 31
      Advanced Member
        Thanks David! The status in table PfiWorkunit table is numeric numbers. Do you have any idea what does 1,2,3, etc. mean? Han
        David Williams
        Veteran Member
        Posts: 1127
        Veteran Member
          0= Not Ready, 1=Ready, 2=Processing, 3=Failed, 4=Completed, etc. Check the WorkUnit form for the status descriptions and the order they show up is the same order of the numbers.
          David Williams
          HDAustin13
          Advanced Member
          Posts: 31
          Advanced Member
            Thank you for your helpful answer!
            FireGeek21
            Veteran Member
            Posts: 84
            Veteran Member

              Here is a query along with the list of status codes:

              select *

              from [databaseName].PFIWORKUNIT W

              where W.STATUS =

              -- 1 => Ready

              -- 2 => Processing

              -- 3 => Failed

              -- 4 => Completed

              -- 5 => Cancel Requested

              -- 6 => Cancelling

              -- 7 => Cancel Failed

              -- 8 => Cancelled

              -- 9 => Not Ready

              --10 => Waiting

              HDAustin13
              Advanced Member
              Posts: 31
              Advanced Member
                Thank you FireGeek21!