[MYSQL]지니안NAC 저장장치 정보 쿼리

Database 2017.01.23 16:38 Posted by 애플자라
SELECT
      A.NL_FQDN,
      A.NL_IPSTR,
      /*A.NL_MAC,*/
      (SELECT NI_MOTHERBOARDNAME FROM ALDER.DEVINFOALL_CPU WHERE NI_DEVID = A.NL_DEVID) AS NI_MOTHERBOARDNAME,
      (SELECT NI_NAME FROM ALDER.DEVINFOALL_CPU WHERE NI_DEVID = A.NL_DEVID) AS NI_NAME,
      A.NL_PLATFORM,
      (SELECT CONCAT(ROUND(NI_TOTALMEM/1024/1024,2),' GB') FROM ALDER.DEVINFOALL_MEM WHERE NI_DEVID = A.NL_DEVID) AS NI_TOTALMEM,
      B.NI_NAME AS DISK_NAME,
      B.NI_VENDOR AS DISK_VENDOR,
      B.NI_MODEL AS DISK_MODEL,
      CASE
        WHEN INSTR(B.NI_MODEL, 'SSD') = '0' THEN "일반"
        WHEN INSTR(B.NI_MODEL, 'SSD') > '0' THEN "SSD"
      END GUBUN
FROM ALDER.NODELIST A, ALDER.DEVINFOALL_STORAGE B
WHERE A.NL_DEVID = B.NI_DEVID
AND B.NI_FILESYSTEM ='NTFS'
ORDER BY A.NL_IPSTR ASC

 

TAG ,