/build/static/layout/Breadcrumb_cap_w.png
05/22/2019 271 views

Hi all,

I am trying to put together an query that will give me the user of a device that has two applications installed.

So far I have this below, but not quiet working.

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 where SMS_R_SYSTEM.ResourceID IN(SELECT SMS_R_SYSTEM.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%APP2%") AND SMS_R_SYSTEM.ResourceID IN(SELECT SMS_R_SYSTEM.ResourceID from SMS_R_System   inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "App1")


Once i have this working I then can take the users out of the AD group for App1, so going forward users will only be in App2 AD Group. 

0 Comments   [ + ] Show comments

Comments


All Answers

0

Try to make two collections. One which checks for App1 only and other which checks for App2 only.


When you get queries right, then make the second collection limited to the first collection. The resulting collection will have both the applications.
Answered 06/24/2019 by: nagendrasingh
Black Belt