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 or collection based on computer model

 
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 or collection based on computer model Page: [1]
Login
Message << Older Topic   Newer Topic >>
query or collection based on computer model - 11/12/2008 4:53:01 PM   
shadster

 

Posts: 35
Score: 0
Joined: 8/6/2008
Status: offline
Hi everyone,

I am trying to build a collection for one specific model in our envionment... and my sql is terrible, but i am slowly learning it (though not fast enough for the boss) i keep getting syntax errors... the model is a dell Optiplex GX260... an older machine that doesn't like one of our packages... soooo i need to creat a seperate one for this specific model...

like i said i just can't get the syntax right...  i am trying to use:
v_GS_COMPUTER_SYSTEM.Model0,    WHERE     v_GS_COMPUTER_SYSTEM.Model0 LIKE '%260'

i think this would be a better way as opposed to using something like a certian proc or chipset... as not all of them have the same processor... or some other distinguishing feature.

any help would be greatly appreciated... and thanks in advance

shadster
Post #: 1
RE: query or collection based on computer model - 11/12/2008 5:02:06 PM   
anyweb


Posts: 34
Score: 2
Joined: 10/20/2008
From: Sweden
Status: offline
i'm looking forward to answers to this question, but in the meantime i have a different approach for you

that of targetting a model from within the Task Sequence itself

you can see how I do that here

http://www.windows-noob.com/forums/index.php?showtopic=563

in addition, here's a cool method of targetting systems based on laptop/desktop/server

http://kongkuba1.spaces.live.com/blog/cns!EEFF1607E296E5AB!319.entry

cheers
anyweb

< Message edited by anyweb -- 11/12/2008 5:03:41 PM >

(in reply to shadster)
Post #: 2
RE: query or collection based on computer model - 11/12/2008 5:03:46 PM   
shadster

 

Posts: 35
Score: 0
Joined: 8/6/2008
Status: offline
oh i forgot to mention that we are still in the process of upgrading to sccm... so this i am still on SMS2003...  sorry

(in reply to anyweb)
Post #: 3
RE: query or collection based on computer model - 11/12/2008 5:10:53 PM   
rodtrent


Posts: 1962
Score: 39
Status: offline
anyweb -- if you want to write for myITforum.com, or have a blog here, let me know.  That way you can get your content noticed right away.

(in reply to anyweb)
Post #: 4
RE: query or collection based on computer model - 11/12/2008 6:44:47 PM  1 votes
jnelson993


Posts: 959
Score: 132
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
quote:

ORIGINAL: shadster

Hi everyone,

I am trying to build a collection for one specific model in our envionment... and my sql is terrible, but i am slowly learning it (though not fast enough for the boss) i keep getting syntax errors... the model is a dell Optiplex GX260... an older machine that doesn't like one of our packages... soooo i need to creat a seperate one for this specific model...

like i said i just can't get the syntax right...  i am trying to use:
v_GS_COMPUTER_SYSTEM.Model0,    WHERE     v_GS_COMPUTER_SYSTEM.Model0 LIKE '%260'

i think this would be a better way as opposed to using something like a certian proc or chipset... as not all of them have the same processor... or some other distinguishing feature.

any help would be greatly appreciated... and thanks in advance

shadster


So...which are you trying to create, a collection query, SMS query, or Web Report query?  Cuz if you're trying to use v_GS_Computer_System for a collection or an SMS query, it's not going to work. v_GS_Computer_System is a view name for SQL and that's for web reports.  If you want to make a collection or query, you'll need to use SMS_G_System_Computer_System.

Collection/SMS Query WQL
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_COMPUTER_SYSTEM
    ON SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId
WHERE  SMS_G_System_COMPUTER_SYSTEM.Model = "OptiPlex GX260"


Equivalent Web Report SQL
SELECT
  sys.ResourceID,
  sys.ResourceType,
  sys.Name0,
  sys.SMS_Unique_Identifier0,
  sys.Resource_Domain_OR_Workgr0,
  sys.Client0
FROM  
  v_R_System AS sys
  INNER JOIN v_GS_Computer_System AS cs
    ON cs.ResourceID = sys.ResourceId
WHERE  cs.Model0 = 'OptiPlex GX260'




_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to shadster)
Post #: 5
RE: query or collection based on computer model - 11/13/2008 8:49:09 AM   
shadster

 

Posts: 35
Score: 0
Joined: 8/6/2008
Status: offline
Thank you Number2!

This is going to be a huge help going forward, and I am more grateful for the clarification and explanation as that is ultimately most beneficial.

teach a man to fish kinda thing...  I love it

Thanks again as I will test today, and do some googling for some of these strings and see what i can dig up

(in reply to jnelson993)
Post #: 6
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> query or collection based on computer model 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.664