I have created a few smart labels to find systems that not get some patches. All of these patches start with the same name "NoPatch" and a keyword. No spaces in the label name. Right now I am trying to create a label to patch all of our other workstations that can get all of the approved patches. They way i am trying to do is by making a smart label that finds all systems the do not contain a label with "NoPatch" The problem is that this smart label seems to be getting all systems regardless of its label. And the "NoPatch" smart labels are getting some but not all of the systems the should be excluded. Here is the code of the 2 smart labels created using the wizard. Can anyone spot the issue with them? 


SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE  WHERE (((1  in (select 1 from SOFTWARE, MACHINE_SOFTWARE_JT where MACHINE_SOFTWARE_JT.MACHINE_ID = MACHINE.ID AND SOFTWARE.ID = MACHINE_SOFTWARE_JT.SOFTWARE_ID and SOFTWARE.DISPLAY_NAME like '%softwarekeyword%')) ))
SELECT MACHINE.NAME AS SYSTEM_NAME, SYSTEM_DESCRIPTION, MACHINE.IP, MACHINE.MAC, MACHINE.ID as TOPIC_ID FROM MACHINE  WHERE (((not exists (select 1 from LABEL, MACHINE_LABEL_JT where MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID AND MACHINE_LABEL_JT.LABEL_ID = LABEL.ID  AND LABEL.TYPE <> 'hidden' and LABEL.NAME like '%NoPatch%')) ) AND (OS_NAME not like '%server%'))  
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share