myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


           



Query returns contents of a "not like" ad group

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Query returns contents of a "not like" ad group Page: [1]
Login
Message << Older Topic   Newer Topic >>
Query returns contents of a "not like" ad group - 5/8/2008 7:52:52 PM   
dspecht

 

Posts: 3
Score: 0
Joined: 5/8/2008
Status: offline
Hi,

I am trying to create a query that contains all servers except ones that are in a specific AD group.
 
Problem is this query:
 
select SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.SystemRole = "Server" and SMS_R_System.SystemGroupName not like "MyDomain\\DONT REBOOT, just patch"
 

Returns all servers (which is good) including those in the Don’t reboot group (which is bad)
 
What am I doing wrong?
 
Thanks,
 
Dan
 


Post #: 1
RE: Query returns contents of a "not like" ad... - 5/8/2008 8:59:23 PM  1 votes
jdavis375

 

Posts: 128
Score: 15
Joined: 5/1/2006
From: Orlando, FL
Status: offline
Dan,
You are battling with what has become one of my favorite items...you need a subselect query. Rod Trent wrote a great article on it on this forum. You can look at it here:
http://www.myitforum.com/articles/1/view.asp?id=179

I fought with trying to create these blasted things by hand for a couple of years before finally finding Rod's article. Made things a lot easier. I also wrote about my experience with these queries in this blog post:  http://verbalprocessor.com/2008/02/26/subselect-query-in-sccm/

Caution...Rod's instructions are pretty detailed. Don't get tempted to skip a step. They are all there for a reason.

Hope that helps.

_____________________________

Jarvis

My Blog: The Realm of the Verbal Processor

If my post was helpful, a rating would be appreciated!

(in reply to dspecht)
Post #: 2
RE: Query returns contents of a "not like" ad... - 5/9/2008 12:10:15 AM   
dspecht

 

Posts: 3
Score: 0
Joined: 5/8/2008
Status: offline
Thanks Jarvis, I will give it a try in the morning.

ps: I went to your blog and read around... Hey I seen you in that video at MMS to!!

(in reply to jdavis375)
Post #: 3
RE: Query returns contents of a "not like" ad... - 5/10/2008 1:22:08 PM   
dspecht

 

Posts: 3
Score: 0
Joined: 5/8/2008
Status: offline
 I followed the directions from your Blog and Rod Trent's "How to" and was able to get the results I needed.

   Thanks!

(in reply to dspecht)
Post #: 4
RE: Query returns contents of a "not like" ad... - 5/10/2008 4:00:01 PM   
jdavis375

 

Posts: 128
Score: 15
Joined: 5/1/2006
From: Orlando, FL
Status: offline
Awesome...it was certainly more of Rod's post than my blog that helped!

Also...glad you enjoyed the video. :-)

_____________________________

Jarvis

My Blog: The Realm of the Verbal Processor

If my post was helpful, a rating would be appreciated!

(in reply to dspecht)
Post #: 5
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> Query returns contents of a "not like" ad group Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.265