/build/static/layout/Breadcrumb_cap_w.png

K1000: Computer list by software smart label

Hello all,

Trying to figure out how to do this in reporting.  I have a software smart label called 'visio -tb' that is used to pull all the 'real' versions of visio.  It is:

SELECT ID FROM SOFTWARE WHERE (((((((((  SOFTWARE.PUBLISHER like '%microsoft%') AND SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio 2010') OR SOFTWARE.DISPLAY_NAME = 'Microsoft Visio Professional 2010') OR SOFTWARE.DISPLAY_NAME = 'Microsoft Visio Professional 2013') OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Professional 2007') OR SOFTWARE.DISPLAY_NAME = 'Microsoft Visio Premium 2010') OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Standard 2007') OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Professional 2003') OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Professional 2003')

The above script works fine.  What I need to be able to do is to pull a list of machines that are pulled from the 'visio -tb' smart label, with computer name, user name, and software version.  My total SQL skills are installing MS SQL, the above script was just editing and existing one.

Thanks a head of time!

 


0 Comments   [ + ] Show comments

Answers (1)

Posted by: kscott 11 years ago
White Belt
0

I'm not sure how you could explicitly reference the smart label in the SQL, but you can use the SQL to build the report query.

I did some quick testing and connecting table you are needing is MACHINE_SOFTWARE_JT.

You may need to play around and tweak a bit, but here might be a general idea of what you are looking for.

 

select MACHINE.NAME, MACHINE.USER_NAME, SOFTWARE.DISPLAY_NAME
from MACHINE
left join MACHINE_SOFTWARE_JT
    on MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID
left join SOFTWARE
    on MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
where SOFTWARE.PUBLISHER = "Adobe Systems, Inc."

 

I didn't have any Visio installed, so I substituted Adobe.  If the above works in your environment, then you can delete the where in my statement and replace it with the where statement you have listed above.  You can try and paste what I have below and let me know how it works out.  I am rather new to this also, but I am pretty sure this will work.

 

select MACHINE.NAME, MACHINE.USER_NAME, SOFTWARE.DISPLAY_NAME
from MACHINE
left join MACHINE_SOFTWARE_JT
   on MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID 
left join SOFTWARE 
   on MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID
WHERE (((((((((  SOFTWARE.PUBLISHER like '%microsoft%') 
   AND SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio 2010') 
   OR SOFTWARE.DISPLAY_NAME = 'Microsoft Visio Professional 2010') 
   OR SOFTWARE.DISPLAY_NAME = 'Microsoft Visio Professional 2013') 
   OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Professional 2007') 
   OR SOFTWARE.DISPLAY_NAME = 'Microsoft Visio Premium 2010') 
   OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Standard 2007') 
   OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Professional 2003') 
   OR SOFTWARE.DISPLAY_NAME = 'Microsoft Office Visio Professional 2003')

 

 

 

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ