Maestro Posted October 6, 2015 Report post Posted October 6, 2015 (edited) Hello everyone! I've got a task to create a query to show the computers which has more then one installation of Java on it (sometimes Java doesn't updates correctly). So I quickly created a query: select distinct SMS_R_System.Name, SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version 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 "Java % Update %" order by SMS_R_System.Name And this query shows me all the computers where Java installed and I can see among them computers that I need. But how to select only computers where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Java % Update %" >1? I think COUNT will be the best for this task but I've didn't find how to correctly use it here. I've tried different constructions but always got an error sign. Can anyone help me? Thank you Edited October 6, 2015 by Maestro Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted October 6, 2015 Report post Posted October 6, 2015 You can't use Count function in WQL. Also keep in mind that you query will only find x86 version of Java. Quote Share this post Link to post Share on other sites More sharing options...
Maestro Posted October 6, 2015 Report post Posted October 6, 2015 You can't use Count function in WQL. Also keep in mind that you query will only find x86 version of Java. It's OK, all computers are x86 Windows. But is there any way to complete my task in query, or I have to create a new report? Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted October 6, 2015 Report post Posted October 6, 2015 There is no simple (or automated) way to do this using WQL. So yes you will need to do this within SSRS/SQL. Quote Share this post Link to post Share on other sites More sharing options...
Maestro Posted October 6, 2015 Report post Posted October 6, 2015 Thanks a lot! Will try my best. Quote Share this post Link to post Share on other sites More sharing options...