Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a new collection

Status
Not open for further replies.

symon75

IS-IT--Management
Feb 24, 2005
2
US
Hi,
I'm a new SMS user and I need to create a collection of my pc. I need to divide remote users, which have a "0" in their name, to local user, which do not have a "0" in their name, obviously.
I'm not able to find a right query value!
Can someone help me? Thank you!
 
Hi!

Two steps should do it:

You'll have to create a query which finds all the systems with the specified file:

select distinct SMS_G_System_SYSTEM.Name from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "ABC.EXE"

Now you have to create a query which returns ALL SYSTEMS except the computers with the exe-File (so you have to include the first query and join it with "not in").

Does it work?

regards,
Gerhard
 
This query will give you records for users with '0' in their user name.

Code:
select * from computer_system_data where COMPUTER_SYSTEM_DATA.UserName0 like '%0%'

This is for users without '0' in their user name

Code:
select * from computer_system_data where COMPUTER_SYSTEM_DATA.UserName0 not like '%0%'

-If it ain't broke, break it and make it better.
 
Thanks!
I haven't used "like", so it doesn't work! ;-)
Now it's ok, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top