It's budget time.. I need to know which computers have warranties that expire between 01.01.2013 and 31.12.2013 so I can ask the big guys for enough money.

I've done modifications to the "expires in the next 60 days" report, but that gives me all computers expiring from now to the end of 2013, which is wrong (the ones expiring the next few months are already replaced).

Can anyone help me restricting the dates to "from date x to date y" in the report?

Answer Summary:
Take out the last line. Also for your dates use something like this. AND DW.END_DATE > '2012-12-01%'
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

5

Might add: This is what we've done so far, and it returns 0 results:

 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.SERVICE_PROVIDER,
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.SERVICE_TAG OR M.BIOS_SERIAL_NUMBER = DA.PARENT_SERVICE_TAG)
WHERE M.CS_MANUFACTURER LIKE '%dell%'
AND M.BIOS_SERIAL_NUMBER!=''
AND DA.DISABLED != 1
AND DW.END_DATE > 2012-12-01
AND DW.END_DATE < 2013-12-31
AND DW.END_DATE = (SELECT END_DATE FROM KBSYS.DELL_WARRANTY DW2 WHERE DW2.SERVICE_TAG=DW.SERVICE_TAG AND DW2.SERVICE_LEVEL_CODE=DW.SERVICE_LEVEL_CODE);
Answered 10/29/2012 by: KRN
Senior Yellow Belt

  • Take out the last line. Also for your dates use something like this.

    AND DW.END_DATE > '2012-12-01%'
    • Spot on! Worked like a charm. Now I can use the link from jknox to sort it :)

      Thanks a lot to both of you!
Please log in to comment

Answers

3

This might help: http://www.itninja.com/question/sql-report-dell-warranty-expires-within-90-days-with-additional-information

Answered 10/29/2012 by: jknox
Red Belt

  • Thanks jknox!
Please log in to comment
Answer this question or Comment on this question for clarity