Ok i know NOTHING about SQL, but I've peiced together a report to try and pull all of our pc's that are 3 years old and older by Dell's ship date. It's not right becuase it will list all of our pc's with the same service tag and then list all the pc's with the next service tag and so on (Hope that makes sense.) This is what I have.

SELECT USER_FULLNAME,M.NAME AS COMPUTER_NAME,DA.SERVICE_TAG,DATE_FORMAT(DA.SHIP_DATE,'%Y/%m/%d')AS SHIP_DATE   FROM KBSYS.DELL_ASSET DA,       MACHINE M WHERE DA.SHIP_DATE < (CURRENT_DATE - INTERVAL 3 YEAR)

Any help would be much appreciated!!

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2

Try this:

SELECT USER_FULLNAME,M.NAME AS COMPUTER_NAME,DA.SERVICE_TAG,DATE_FORMAT(DA.SHIP_DATE,'%Y/%m/%d')AS SHIP_DATE
   FROM KBSYS.DELL_ASSET DA
  LEFT JOIN MACHINE M ON M.BIOS_SERIAL_NUMBER=DA.SERVICE_TAG
 WHERE DA.SHIP_DATE < (CURRENT_DATE - INTERVAL 3 YEAR)

Answered 04/24/2012 by: jaredv
Fourth Degree Green Belt

  • Thanks a lot! That was it!
Please log in to comment

Answers

0

Thanks a lot! That works perfectly!

Answered 05/01/2012 by: BDEEN
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share