Forum Discussion

Pangal's avatar
Pangal
Level 5
9 years ago

Sql query for no of jobs

Is it possible to fetch    Number of NetBackup job during the year 2015 Number of failed and partially successful jobs during the year 2015   if yes any sql query , we need this d...
  • RiaanBadenhorst's avatar
    9 years ago

    Very simplistic, you can modify as required.

     

    select
    count (domain_jobarchive.statuscode)
    from domain_jobarchive
    where domain_jobarchive.statuscode in (0)
    and
    domain_JobArchive.endTime BETWEEN '142007040000000000' AND '145160640000000000'

     

    and 

     

    select
    count (domain_jobarchive.statuscode)
    from domain_jobarchive
    where domain_jobarchive.statuscode not in (0)
    and
    domain_JobArchive.endTime BETWEEN '142007040000000000' AND '145160640000000000'