lightsout
Posts: 144
Score: 5 Joined: 10/10/2006 Status: offline
|
I like jfunk's better due to using dateadd, rather than the hardcoded values I use. Which I actually have a script which runs daily on the SMS server to update it. The one gotcha with this is every machine is counted as having not run software in the last 90 days even if it isn't installed, or was installed 1 day ago. So you need to deal with these odd-balls also. select SMS_R_System.ResourceID,SMS_R_System.ResourceType,SMS_R_System.Name,SMS_R_System.SMSUniqueIdentifier,SMS_R_System.ResourceDomainORWorkgroup,
SMS_R_System.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceID
inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.ResourceID is not in
(select mus.ResourceID from SMS_MonthlyUsageSummary mus join SMS_MeteredFiles mf on mus.FileID=mf.MeteredFileID where mf.ProductName like "Adobe Acrobat All" and mus.LastUsage >= '7/27/2006')
and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName is like "Adobe Acrobat%"
and SMS_G_System_ADD_REMOVE_PROGRAMS.InstallDate < '20061011'
and SMS_G_System_OPERATING_SYSTEM.InstallDate < '20060910'
< Message edited by lightsout -- 9/21/2007 8:55:03 AM >
|