SQL query help
I am running altiris 7.1 version,
For task failure reports, I have a an existing sql query that will list what are all nodes that failed.
Issue is , I schedued this job twice a day. Now the failure report also showing the job failed 2 times. I need help on getting the latest record for that node instead of showing 2 records. Any help is appreciated. I am attaching the existing sql query.
it.Name as Task,
from Evt_Task_Instances eti
join ItemVersions iv
on eti.TaskVersionGuid = iv.VersionGuid
join vItem it
on it.Guid = iv.ItemGuid
join vComputer vc
on vc.Guid = eti._ResourceGuid
join dbo.CollectionMembership cm
on vc.Guid = cm.ResourceGuid
eti.EndTime >=replace(convert(varchar,getdate()-1,111),'/','-') +' 22:00:00.000'
and eti.EndTime is not null
and eti.Result = 1
(it.Name ='Execute install command for Job NameXX1'
or it.Name ='Execute install command for Job NameXX2'