/build/static/layout/Breadcrumb_cap_w.png

HOW TO: Create a Machine Report by Label Group

I've been gettng asked for this a lot in my trainings. Here is a machine report for all labels belonging to the "Locations" label group.

Hopefully you can get some use out of it.

SELECT M.IP, 
       M. NAME, 
       M.USER_FULLNAME, 
       M.USER_LOGGED, 
       M.CS_MODEL, 
       M.CS_MANUFACTURER, 
       M.SYSTEM_DESCRIPTION, 
       M.OS_NAME, 
       M.SERVICE_PACK, 
       CHILD. NAME AS LABEL_NAME 
FROM   LABEL CHILD, 
       LABEL_LABEL_JT LL, 
       LABEL PARENT, 
       MACHINE M, 
       MACHINE_LABEL_JT ML 
WHERE  CHILD.ID = LL.CHILD_LABEL_ID 
   AND LL.LABEL_ID = PARENT.ID 
   AND M.ID = ML.MACHINE_ID 
   AND ML.LABEL_ID = CHILD.ID 
   AND PARENT. NAME = 'LOCATIONS' 
ORDER  BY CHILD. NAME, 
          M. NAME 


Comments

  • Thanks, I had actually been messing with this awhile ago and never finished. - ohiosoundguy 12 years ago
  • Nice Job. - dan@kace.com 12 years ago
  • I used above with this and added some stuff.

    JUST CHANGE ^^ TO GROUP LABEL AND SOFTWARE.


    Select
    M.IP,
    SOFTWARE.DISPLAY_NAME,
    SOFTWARE.ID,
    M.NAME,
    M.USER_FULLNAME,
    CHILD.NAME As NAME1,
    M.USER,
    USER.WORK_PHONE,
    USER.EMAIL,
    USER.CUSTOM_2
    From
    LABEL CHILD,
    LABEL_LABEL_JT LL,
    LABEL PARENT,
    MACHINE M Inner Join
    MACHINE_SOFTWARE_JT On MACHINE_SOFTWARE_JT.MACHINE_ID = M.ID Inner Join
    SOFTWARE On MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID Inner Join
    USER On M.USER_NAME = USER.USER_NAME,
    MACHINE_LABEL_JT ML
    Where
    CHILD.ID = LL.CHILD_LABEL_ID And
    LL.LABEL_ID = PARENT.ID And
    M.ID = ML.MACHINE_ID And
    ML.LABEL_ID = CHILD.ID And
    (SOFTWARE.DISPLAY_NAME Like '%^YOUR__SOFTWARE^%' And
    PARENT.NAME = '^YOUR___GROUP_LABEL^')
    Order By
    USER.CUSTOM_2 --EMAIL ADDRESS FOR USER - mikesharp1 12 years ago
This post is locked
 
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