Kace report of systems 5 years old from Dell warranty ship date
Hi I'm looking to sort systems that are older than 5 years from the Dell ship date. Could someone assist with such report? Would like it to be sorted by "Decommission date"
Headers:
"Host name"
"End-user"
"System Model"
"Ship date"
"Warranty End Date"
"Decommission Date"
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
IgorAngelini
2 years ago
Top Answer
Here is a query that does sorta what you want, please define "Decommission date", it's the only thing that's missing.
USER.FULL_NAME AS 'ENDUSER',
MACHINE.CS_MODEL AS 'SYSTEM MODEL',
DELL_ASSET.SHIP_DATE AS 'SHIP DATE',
MAX(DELL_WARRANTY.END_DATE) AS 'WARRANTY END DATE'
FROM MACHINE
LEFT JOIN USER
ON MACHINE.USER = USER.USER_NAME
LEFT JOIN DELL_ASSET
ON DELL_ASSET.SERVICE_TAG = MACHINE.BIOS_SERIAL_NUMBER
LEFT JOIN DELL_WARRANTY
ON DELL_WARRANTY.SERVICE_TAG = MACHINE.BIOS_SERIAL_NUMBER
WHERE DELL_ASSET.SHIP_DATE < NOW() - INTERVAL 5 YEAR
GROUP BY MACHINE.ID
ORDER BY DELL_ASSET.SHIP_DATE /*DESC*/
Uncomment DESC to invert the sorting order to descend