cancel
Showing results for 
Search instead for 
Did you mean: 

Including Last Successful Backup in SQL code

Hi again,
I'm working with the version of OpsCenter Version 7.6.0.4.

Now I am trying to create a report including , Policy name, cliente name ,Jobstate,status attemps,start and end time; I am working with this code:

SELECT


domain_Job.Policyname as "Policy Name",
domain_Job.Clientname as "Client Name",


UTCBigintToNOMTime(domain_Job.startTime) as "Start Time",
UTCBigintToNOMTime(domain_Job.endTime) as "End Time",


lookup_jobstate.name as "Job State",
domain_Job.statuscode "Status",
domain_Job.attemptcount as "Attempts",
lookup_BackupType.name as "Job Type"

FROM domain_Job, lookup_BackupType, lookup_jobstate
WHERE
(domain_Job.backuptype=lookup_BackupType.id AND lookup_BackupType.id not in (-1))
AND
(domain_Job.state=lookup_jobstate.id AND domain_Job.state in (0,1,2,3,4,5,100))
AND
domain_Job.id=domain_job.parentjobid
AND
UTCBigintToNOMTime(domain_Job.startTime) > GETDATE()-1

ORDER BY  "Policy Name" ASC, "Client Name" 

but I need to include Last Successful Backup, please, how can I include it in this code?

Regards