Video Screencast Help

Need a Report for Active machine from last "N" days

Created: 12 Apr 2013 • Updated: 17 Apr 2013 | 2 comments
This issue has been solved. See solution.


I need to create a report for all computers in NS that were active in the last 60 days, with Name, Make, Model, OS and Type. 

Suggestion greatly appreciated 

Operating Systems:

Comments 2 CommentsJump to latest comment

fabio.sanches's picture

Hi Manny123,

In this HOWTO you will find info to querys this type of information (HOWTO21590 - Which tables hold the last configuration request and last inventory received values?)


Fábio Sanches

Manny123's picture
I got the SQL Query
SELECT     vc.Name, vc.Domain, vc.[OS Name], ictr.IsActive, ictr.LastRegistered, DATEDIFF(dd, ictr.LastRegistered, GETDATE()) AS Days, ihld.Manufacturer, ihld.Model,
                      ihld.[Device ID]
FROM         dbo.vComputer AS vc LEFT OUTER JOIN
                      dbo.vHWComputerSystem AS ihld ON vc.Guid = ihld._ResourceGuid LEFT OUTER JOIN
                      dbo.Inv_Client_Task_Resources AS ictr ON vc.Guid = ictr._ResourceGuid
WHERE     (ictr.IsActive = 1) AND (DATEDIFF(dd, ictr.LastRegistered, GETDATE()) < 60)