|
jfunk -> RE: Collection based on software metering? (9/21/2007 1:52:04 PM)
|
Well I created a WQL query with a static timekey of 3 mos old that you can apply directly to the collection. 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 where sms_R_System.ResourceID in ( SELECT resourceID FROM sms_G_System_ADD_REMOVE_PROGRAMS where sms_G_System_ADD_REMOVE_PROGRAMS.displayname='Remote Desktop 32' ) and sms_R_System.ResourceID not in ( select sms_MonthlyUsageSummary.ResourceID from sms_MonthlyUsageSummary join sms_MeteredFiles on sms_MonthlyUsageSummary.FileID=sms_MeteredFiles.MeteredFileID where sms_MeteredFiles.ProductName='Mcafee RD32 - All Sites' and sms_MonthlyUsageSummary.TimeKey>=200706 ) and sms_R_System.ClientVersion >= '2.5' and sms_R_System.Client = 1 I really would like to get the date functions working, can anyone suggest what I am doing wrong on this line: sms_MonthlyUsageSummary.TimeKey>=(100*datepart(Year,(dateadd(mm,-3,getdate()))))+ (datepart(Month,(dateadd(mm,-3,getdate())))) instead of sms_MonthlyUsageSummary.TimeKey=200706 That line using the time functions works fine in SQL and I understood these all to be supported in WQL when used with the WHERE clause so I am at a loss what is happening here.
|
|
|
|