Report - All PC's and Servers with ship date by IP address
Hello all,
I was needing a report that lists pcs and servers with their ship date arranged by IP address. I cant select the ship date without doing a SQL type report. Could anybody lend a hand with some SQL code?
Thanks in advance,
Terry
I was needing a report that lists pcs and servers with their ship date arranged by IP address. I cant select the ship date without doing a SQL type report. Could anybody lend a hand with some SQL code?
Thanks in advance,
Terry
0 Comments
[ + ] Show comments
Answers (2)
Answer Summary:
SELECT M.NAME, DA.SERVICE_TAG, DATE_FORMAT(DA.SHIP_DATE,'%Y/%m/%d')AS SHIP_DATE, M.IP FROM KBSYS.DELL_ASSET DA, MACHINE M WHERE DA.SERVICE_TAG = M.BIOS_SERIAL_NUMBER ORDER BY INET_ATON(IP)
SELECT M.NAME, DA.SERVICE_TAG, DATE_FORMAT(DA.SHIP_DATE,'%Y/%m/%d')AS SHIP_DATE, M.IP FROM KBSYS.DELL_ASSET DA, MACHINE M WHERE DA.SERVICE_TAG = M.BIOS_SERIAL_NUMBER ORDER BY INET_ATON(IP)
Please log in to answer
Posted by:
dchristian
12 years ago
Is this what your looking for?
SELECT M.NAME,
DA.SERVICE_TAG,
DATE_FORMAT(DA.SHIP_DATE,'%Y/%m/%d')AS SHIP_DATE,
M.IP
FROM KBSYS.DELL_ASSET DA,
MACHINE M
WHERE DA.SERVICE_TAG = M.BIOS_SERIAL_NUMBER
ORDER BY INET_ATON(IP)
Comments:
-
I took this same code and modified it a little so that it looks like 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, MACHINE M WHERE DA.SERVICE_TAG = M.BIOS_SERIAL_NUMBER ORDER BY INET_ATON(IP)
I know NOTHING about sql code, but looking over yours i was able to figure out 90% of what I need. The only other thing i need that I cant figure out is I would like for it to only show (by ship date) PC's that are 3 years old and older. I tried to do:
WHERE DA.SHIP_DATE >= '1095' but that didnt work at all. Help please!! - BDEEN 12 years ago-
I also tried this and it's giving me pc's older than 3 years:
WHERE DA.SHIP_DATE < (CURRENT_DATE - INTERVAL 3 YEAR)
But it's reporting all pcs with one service tag and then it does all the pc's with the next service tag and so on. :/ - BDEEN 12 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.