/build/static/layout/Breadcrumb_cap_w.png

Help with Creating an SQL report with an Asset Type for Location

I'm trying to create an SQL script that gives me a Dell Warranty report and then add a location of the device. The location is a separate Asset Type from the Device. For example I have all my locations listed as their own Asset.
The field is ASSET_DATA_1

The script below gives me the information I need I just don't know how to add the location information from ASSET_DATA_1.

SELECT M.NAME AS MACHINE_NAME, 

M.CS_MODEL AS MODEL, 

DA.SERVICE_TAG, 

DA.SHIP_DATE,

M.USER_LOGGED AS LAST_LOGGED_IN_USER, 

DW.SERVICE_LEVEL_DESCRIPTION, 

DW.END_DATE AS EXPIRATION_DATE 

FROM DELL_WARRANTY DW JOIN DELL_ASSET DA ON (DW.SERVICE_TAG = DA.SERVICE_TAG) 

JOIN MACHINE M ON (M.BIOS_SERIAL_NUMBER = DA.PARENT_SERVICE_TAG OR M.BIOS_SERIAL_NUMBER = DA.SERVICE_TAG) 

LEFT JOIN DELL_WARRANTY DW2 ON DW2.SERVICE_TAG=DW.SERVICE_TAG and DW2.END_DATE > NOW() 

WHERE M.CS_MANUFACTURER LIKE '%dell%' 

AND M.BIOS_SERIAL_NUMBER!='' 

AND DA.DISABLED != 1 

AND DW.END_DATE < NOW() 

AND DW2.SERVICE_TAG IS NULL;




0 Comments   [ + ] Show comments

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