?
Solved

SCCM query help

Posted on 2009-02-12
3
Medium Priority
?
5,501 Views
Last Modified: 2013-11-21
Hi

I'm having trouble with an SCCM query not returning the correct information.

I'm trying to do a dynamic collection of computers based on their hostname. My computers are named LIB-<Building>-<number>

Examples: LIB-HSS-01, LIB-BUS-15

What I am trying to do is get a list of all computers in a building. So I've run the SMS query below but I don't get any results. Can someone please point me in the right direction fo where I am going wrong.

The criteria I set up to generate the query was "System Resource.Name uppercase is equal to "%BUS%""

Regards

Mat




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 UPPER(SMS_R_System.Name) = "%BUS%"

Open in new window

0
Comment
Question by:it-services
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
matrixnz earned 500 total points
ID: 23637497
You need to use "Like" not "=" otherwise the WildCard "%" is seen as a real identifier.

Hope that made sense.

Cheers
0
 
LVL 29

Expert Comment

by:matrixnz
ID: 23637527
Also I assume that BUS isn't inside the name by default but you could be more specific, also wouldn't worry about the upper.  Use something like
"LIB-BUS-%" this makes it more specific

Cheers
0
 
LVL 1

Author Closing Comment

by:it-services
ID: 31546419
Thanks Matrixnz that has worked
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On a regular basis I get questions about slow RDP performance, RDP connection problems, strange errors and even BSOD, remote computers freezing or restarting after initiation of a remote session. In a lot of this cases the quick solutions made b…
Know what services you can and cannot, should and should not combine on your server.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question