/build/static/layout/Breadcrumb_cap_w.png

Help to show All labels from a device in report

I need to show all labels in this device... Can i do it? i try with the LABEL table, no success



select MACHINE.NAME,
MACHINE.IP,
MACHINE.MAC,
OS_NAME,
MACHINE.USER_LOGGED, 
MACHINE.LAST_SYNC,
MACHINE.CS_MANUFACTURER,
MACHINE.CS_MODEL,
MACHINE.RAM_TOTAL,
MACHINE.CLIENT_VERSION,
MACHINE.ID ,
from 
MACHINE 

WHERE ((MACHINE.NAME = 'wks-06136'))

1 Comment   [ + ] Show comment
  • The wizard can do that for you. Have you tried?
    Change system name field towards bottom.

    also try this instead in your code. You may also not need the (( )), single might do.

    WHERE ((MACHINE.NAME = '%wks-06136%'))

    -------------------

    SELECT MACHINE.NAME AS SYSTEM_NAME, (SELECT group_concat(distinct if(LABEL.NAME not like 'HDN_LABEL_%', LABEL.NAME, 'System Hidden') separator '\n') FROM MACHINE_LABEL_JT MLJT INNER JOIN LABEL ON MLJT.LABEL_ID = LABEL.ID WHERE MACHINE.ID = MLJT.MACHINE_ID ORDER BY LABEL.NAME) as LABEL_NAME, MACHINE.CLIENT_VERSION, MACHINE.IP, (UNIX_TIMESTAMP(LAST_SYNC))as LAST_SYNC_SECONDS, MACHINE.MAC, OS_NAME, USER_LOGGED, CS_MANUFACTURER, CS_MODEL, RAM_TOTAL FROM MACHINE LEFT JOIN MACHINE_LABEL_JT ON (MACHINE_LABEL_JT.MACHINE_ID = MACHINE.ID) LEFT JOIN LABEL ON (LABEL.ID = MACHINE_LABEL_JT.LABEL_ID) WHERE ((MACHINE.NAME like '%INSERT YOUR SYSTEM NAME HERE%')) GROUP BY MACHINE.ID ORDER BY SYSTEM_NAME - nshah 7 years ago
    • dont :(
      and its work! I will try to use more the wizard...

      Thank you so much... - fabio.jourdan 7 years ago

Answers (0)

Be the first to answer this question

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