Jump to content

Recommended Posts

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 by Maestro

Share this post

Link to post
Share on other sites

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?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...