/build/static/layout/Breadcrumb_cap_w.png

Receiving double responses in Warranty Report

I have a bit of code here that should return everything in Kace's sytem with an expired warranty. And yet, I receive a lot of double results.

For example, from the same machine (name, model, Service tag) I've received in the same report three entries for:

  •  7/21/2010 23:59
  •  7/21/2010 23:59
  •  7/21/2010 23:59

Here I see two doubles, but they shouldnt even be there if it was renewed, right? Is there any way to clean this up? I'm at a loss.

Here's the code. Thanks in advance!

 

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_CODE, DW.SERVICE_LEVEL_DESCRIPTION, DW.END_DATE AS EXPIRATION_DATE 
FROM KBSYS.DELL_WARRANTY  DW
 LEFT JOIN KBSYS.DELL_ASSET DA ON (DW.SERVICE_TAG = DA.SERVICE_TAG)
 LEFT JOIN MACHINE M ON (M.BIOS_SERIAL_NUMBER = DA.PARENT_SERVICE_TAG OR M.BIOS_SERIAL_NUMBER = DA.SERVICE_TAG)  
WHERE M.CS_MANUFACTURER LIKE '%dell%'
AND M.BIOS_SERIAL_NUMBER!=''
AND DA.DISABLED != 1
AND  DW.END_DATE < NOW()
AND  DW.SERVICE_TAG NOT IN ( SELECT SERVICE_TAG FROM KBSYS.DELL_WARRANTY WHERE END_DATE > NOW());
 


 


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
See here: http://www.itninja.com/question/dell-expired-warranty-report-multiple-listing-for-each-machine-need-unique-only
Posted by: tshupp 12 years ago
3rd Degree Black Belt
0

See here: http://www.itninja.com/question/dell-expired-warranty-report-multiple-listing-for-each-machine-need-unique-only

 
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