?
Solved

SMS Query

Posted on 2007-07-27
3
Medium Priority
?
1,168 Views
Last Modified: 2013-11-21
I need help with a SMS Query. I can search on FILE_NAME = "Acrobat.exe" and FILE_VERSION is less than "8.0%" OR I can search for FILE_NAME = ""Illustrator.exe" but not both at the same time. I am using a sub select and have tried many different things.

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_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 = "Acrobat.exe" and SMS_G_System_SoftwareFile.FileVersion < "8.0%" and SMS_G_System_SYSTEM.Name not in (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 != "Illustrator.exe")
0
Comment
Question by:Mister_Spock
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
matrixnz earned 1500 total points
ID: 19598448
Hi Mister_Spock

Not entirely sure what you're looking for but the following displays both Acrobat.exe with Version# less than 8.0 and also Illustrator.exe.

Cheers

select SMS_R_System.Name, SMS_G_System_SoftwareFile.FileName, SMS_G_System_SoftwareFile.FileVersion from  SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "Acrobat.exe" and SMS_G_System_SoftwareFile.FileVersion < "8.0%" or SMS_G_System_SoftwareFile.FileName = "illustrator.exe"

0
 
LVL 29

Expert Comment

by:matrixnz
ID: 19600173
Hi Mister_Spock

Thanks for the points however can you tell me why you gave me a b grading, for future reference?

Cheers
0
 
LVL 3

Author Comment

by:Mister_Spock
ID: 19600273
I was looking for a way to use the not in keyword in a sub-select. I could always get both Acrobat.exe version < 8 and Illustrator.exe but I needed a way to only display Acrobat.exe if the PC did not have Illustrator.exe as well. After alot of research I went another way. Thank you for trying though.

where SMS_G_System_SoftwareFile.FileName = "Acrobat.exe" and SMS_G_System_SoftwareFile.FileVersion < "8.0%" and SMS_G_System_SYSTEM.Name not in (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 != "Illustrator.exe")
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Remote Desktop Protocol or RDP has become an essential tool in many offices. This article will show you how to set up an external IP to point directly to an RDP session. There are many reasons why this is beneficial but perhaps the top reason is con…
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

807 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