Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

SCCM 2012 Query help

Hi Experts,

I am trying to get a query to work in SCCM 2012, but can't get it right.

I want to list all computers  in a collection with Java that is less than 7.0.510, but not 7.0.510. So if a computer has 7.0.510, it won't be listed but all below that version will be.
One collection for x64 and one x86.

The strategy of just using the Installed Applications and Display name like %Java% and version less than 7.0.510, but not 7.0.510 failed.

The plan was to shoot a deployment towards this collection with version 7.0.510 and see the number of computers drop in numbers.

anyone know how to get it right?
0
Madjax
Asked:
Madjax
  • 6
  • 3
  • 2
1 Solution
 
Nagendra Pratap SinghCommented:
Where is the current query?
0
 
Lionel MMSmall Business IT ConsultantCommented:
There is a similar question already here at EE, you would just have to tweak the version
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_26928160.html
0
 
MadjaxAuthor Commented:
I will try it when i am back at work.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
MadjaxAuthor Commented:
I can't get it to work with that link (even when trying to mod it). Problem is when people write such queries is that it only fits them most of the time.

It's so frustrating that MS doesn't allow many AND statements in same query. Does one need to be SQL Legend to fix a simple SCCM query?
0
 
Nagendra Pratap SinghCommented:
SCCM mostly works. The tools provided in it are fit for 99 % of the users.

BTW you have still not listed the exact query that is not working.
0
 
MadjaxAuthor Commented:
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_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Java 7%" and SMS_G_System_ADD_REMOVE_PROGRAMS.Version < "7.0.510" and SMS_G_System_ADD_REMOVE_PROGRAMS.Version != "7.0.510"

Open in new window

0
 
Nagendra Pratap SinghCommented:
Does this much work?



    My Account
    Log Out

    Help
    About Us

    Hello,  Nagendra Pratap Singh

798

    Ask
    Answer
    Topics
        Microsoft
        Apple
        Digital Living
        Hardware
        Software
        Operating Systems
        Storage
        Database
        Security
        Programming
        Web Development
        Networking
        Virus & Spyware
        Copy Review
        Community Support
        Browse All
    Articles
    Cloud Class New
    BugFinder
        Start Testing
        Submit a Project
        How it Works
        Points for Experts
    More
        Drackula DCIM
        Writing Help
        Job Board
        Business Accounts
        EE Blog

Experts Exchange Logo

or Go to Advanced Search
Experts Exchange > OS > Microsoft OS > MS Server OS > SCCM 2012 Query help
Question

    Ask A New Question

SCCM 2012 Query help
Asked by: Madjax
Hi Experts,

I am trying to get a query to work in SCCM 2012, but can't get it right.

I want to list all computers  in a collection with Java that is less than 7.0.510, but not 7.0.510. So if a computer has 7.0.510, it won't be listed but all below that version will be.
One collection for x64 and one x86.

The strategy of just using the Installed Applications and Display name like %Java% and version less than 7.0.510, but not 7.0.510 failed.

The plan was to shoot a deployment towards this collection with version 7.0.510 and see the number of computers drop in numbers.

anyone know how to get it right?

    2014-01-22 at 13:08:36ID28344844
Tags
    sccm 2012
    ,
    configuration manager
    ,
    query
    ,
    deployment
Topics
    Microsoft Server
    ,
    Microsoft Operating Systems
Participating Experts
    2
Points
    500
Comments
    6

Request Attention
Answers
 

Your Comment

by: Nagendra Pratap SinghPosted on 2014-01-23 at 14:39:40ID: 39802426
Rank: Sage
Where is the current query?
 

Expert Comment

by: lionelmmPosted on 2014-01-23 at 19:44:49ID: 39803077
Rank: Wizard
There is a similar question already here at EE, you would just have to tweak the version
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_26928160.html
 

Author Comment

by: MadjaxPosted on 2014-01-27 at 12:55:15ID: 39811229
I will try it when i am back at work.
 

Author Comment

by: MadjaxPosted on 2014-01-30 at 13:12:53ID: 39820138
I can't get it to work with that link (even when trying to mod it). Problem is when people write such queries is that it only fits them most of the time.

It's so frustrating that MS doesn't allow many AND statements in same query. Does one need to be SQL Legend to fix a simple SCCM query?
 

Your Comment

by: Nagendra Pratap SinghPosted on 2014-01-30 at 15:17:51ID: 39820291
Rank: Sage
SCCM mostly works. The tools provided in it are fit for 99 % of the users.

BTW you have still not listed the exact query that is not working.
 

Author Comment



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_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Java 7%" and SMS_G_System_ADD_REMOVE_PROGRAMS.Version < "7.0.510"
0
 
Lionel MMSmall Business IT ConsultantCommented:
Nagendra Pratap Singh
What was this--it looks like you copied and pasted the EE page you were on--this page.
0
 
MadjaxAuthor Commented:
The query that I posted lists even the ones that have version 7.0.510 which I don't want. So that's the issue.
The "NOT equal to"-step doesn't work.
0
 
MadjaxAuthor Commented:
anyone?
0
 
MadjaxAuthor Commented:
It's abandoned and I got no solution to it.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now