Last Config Request Report Help
I'm trying to edit the computer summary report to include the field for "last config request date". Can someone tell me how I can alter this report to include that. I'm new to report writing...up until recent, the canned reports provided what I needed.
Thanks
SELECT DISTINCT
i.Guid,
i.[Name] [Name],
d.Domain [Domain],
sn1.[System Manufacturer] [Manufacturer],
sn1.[Computer Model][Computer Model],
cpu.[Speed] [CPU],
cpu.Type [CPU Type],
m1.[Total Physical Memory (MB)][Memory MB],
s1.[System Type] [System Type],
ld.[Operating System] [Operating System],
ld.Version [Version],
ld.[Service Pack] [Service Pack],
ld.[Installed On] [Installed On],
ld.[Format] [Format],
ld.[Size(MB)],
ld.[Free(MB)],
sn1.[Serial Number] [Serial Number],
s1.[Logon Name] [Logon],
dbo.fnGetIPAddresses (i.Guid, 'IP Address') [IP Address],
dbo.fnGetIPAddresses (i.Guid, 'Default Gateway') [Gateway],
dbo.fnGetIPAddresses (i.Guid, 'Subnet') [Subnet]
FROM dbo.vComputer i
JOIN dbo.Inv_AeX_AC_Identification d
ON d.[_ResourceGuid] = i.Guid
JOIN dbo.CollectionMembership cm
ON cm.ResourceGuid = i.[Guid]
JOIN dbo.vCollection it
ON it.Guid = cm.CollectionGuid
LEFT JOIN dbo.Inv_AeX_HW_Memory m1
ON m1.[_ResourceGuid] = i.Guid
LEFT JOIN dbo.Inv_AeX_OS_System s1
ON s1.[_ResourceGuid] = i.Guid
LEFT JOIN dbo.Inv_AeX_HW_Serial_Number sn1
ON sn1.[_ResourceGuid] = i.Guid
LEFT JOIN dbo.Inv_AeX_AC_TCPIP t1
ON t1.[_ResourceGuid] = i.Guid
LEFT JOIN dbo.Inv_AeX_HW_CPU_spt p1
ON p1.[_ResourceGuid] = i.Guid
LEFT JOIN dbo.Cmn_HW_CPU_Common cpu
ON cpu.[_KeyHash] = p1.[_KeyHash]
LEFT JOIN
(
SELECT DISTINCT
i.Guid,
cop.[OS Name] [Operating System],
cop.Version [Version],
o1.[Service Pack] [Service Pack],
SUBSTRING(o1.[Install Path],1,2) [Installed On],
l1.[File System] [Format],
l1.[Size in MBytes] [Size(MB)],
l1.[Free Space in MBytes] [Free(MB)]
FROM dbo.vComputer i
JOIN dbo.Inv_AeX_HW_Logical_Disk l1
ON l1.[_ResourceGuid] = i.Guid
JOIN dbo.Inv_AeX_OS_Operating_System_spt o1
ON o1.[_ResourceGuid] = i.Guid
JOIN dbo.Cmn_OS_Operating_System_Common cop
ON cop.[_KeyHash] = o1.[_KeyHash]
JOIN dbo.Inv_AeX_AC_Identification d
ON d.[_ResourceGuid] = i.Guid
JOIN dbo.CollectionMembership cm
ON cm.ResourceGuid = i.[Guid]
JOIN dbo.vCollection it
ON it.Guid = cm.CollectionGuid
WHERE 1 = 1
AND l1.[Device ID] = SUBSTRING(o1.[Install Path],1,2)
AND d.[System Type] LIKE 'Win%'
AND i.[Name] LIKE '%ComputerName%'
AND d.Domain LIKE '%Domain%'
AND it.[Guid] = '%Collection%'
) AS ld
ON i.Guid = ld.[Guid]
WHERE 1 = 1
AND d.[System Type] LIKE 'Win%'
AND i.[Name] LIKE '%ComputerName%'
AND d.Domain LIKE '%Domain%'
AND it.[Guid] = '%Collection%'
Comments
Try this
I can't test it out for you. dbo.fnGetIPAddresses is not on my system.
You should be able to add this line to your Select statement like this:
SELECT DISTINCT
i.Guid,
i.[Name] [Name],
d.Domain [Domain],
(Select Max(StartTime) from Evt_NS_Client_Config_Request t2
where t2.resourceguid = i.guid) As 'last config request date',
sn1.[System Manufacturer] [Manufacturer],
rest is the same
Dan
Would you like to reply?
Login or Register to post your comment.