/build/static/layout/Breadcrumb_cap_w.png

KACE Dell Warranty without Digital Support and max date

Hello - I've been able to get an SQL report that will spit out the max warranty date but sometimes that max date is the dell digital support which I don't want.  I can't seem to figure out how to add the "not like %digital% or whatever I need.  Thank you for any help.  


SELECT DISTINCT M.NAME AS MACHINE_NAME

,M.CS_MODEL AS MODEL

, OS_NAME

, DA.SERVICE_TAG

, DA.SHIP_DATE

, M.USER_LOGGED AS LAST_LOGGED_IN_USER

, DW.END_DATE AS EXPIRATION_DATE

, M.LAST_INVENTORY 

, A20.NAME AS DEPT

FROM DELL_WARRANTY DW 

LEFT JOIN DELL_ASSET DA ON (DW.SERVICE_TAG = DA.SERVICE_TAG) 

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

LEFT JOIN ASSET ON ASSET.MAPPED_ID = M.ID AND ASSET.ASSET_TYPE_ID=5 

LEFT JOIN ASSET_ASSOCIATION J20 ON J20.ASSET_ID = ASSET.ID AND J20.ASSET_FIELD_ID=20

LEFT JOIN ASSET A20 ON A20.ID = J20.ASSOCIATED_ASSET_ID   

WHERE M.CS_MANUFACTURER LIKE '%dell%' 

AND M.BIOS_SERIAL_NUMBER !=''

AND DA.DISABLED != 1 

AND DW.END_DATE = (SELECT MAX(END_DATE) FROM DELL_WARRANTY DW2 WHERE DW2.SERVICE_TAG=DW.SERVICE_TAG AND DW2.SERVICE_LEVEL_CODE=DW.SERVICE_LEVEL_CODE)


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: Hobbsy 3 years ago
Red Belt
0

Top Answer

Would adding in to your where statement work?

AND DW.SERVICE_LEVEL_DESCRIPTION  NOT LIKE '%Digital%'

Posted by: cetoth 3 years ago
White Belt
0

Thank you - that looks to have worked!  

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