Having issues running a report that shows when software is added to a particular machine
I am attempting to generate a report that shows when any software that is added to a particular machine in our computer inventory. Here is the code that the KACE representative and I have been manipulating and it still doesnt yield any results when the report is ran:
select TIME, ASSET.NAME as MACHINE_NAME, DESCRIPTION
from ASSET_HISTORY, ASSET, MACHINE
WHERE DESCRIPTION LIKE '%Found Software%' AND ASSET_HISTORY.TIME >
DATE_SUB(NOW(),INTERVAL 1 DAY)
and ASSET_ID=ASSET.ID AND ASSET.NAME=MACHINE.NAME and MACHINE.USER_DOMAIN
!= 'SERVICENET'
AND MACHINE.NAME='Babyak_Win7'
Any assistance would be greatly appreciated.
Answers (1)
Here is the SQL that I use for this type of report:
SELECT ASSET_HISTORY.ASSET_ID, ASSET_HISTORY.TIME, ASSET_HISTORY.DESCRIPTION, ASSET_HISTORY.USER_TEXT, MACHINE.NAME FROM ASSET_HISTORY JOIN ASSET ON ASSET.ID = ASSET_HISTORY.ASSET_ID JOIN MACHINE ON ASSET.NAME = MACHINE.BIOS_SERIAL_NUMBER WHERE DESCRIPTION LIKE '%Found software item%in inventory.%' AND ( (DATE(ASSET_HISTORY.TIME)> DATE_SUB(NOW(), INTERVAL 1 day) AND DATE(ASSET_HISTORY.TIME)<= NOW())) AND MACHINE.NAME = 'steelc'
Comments:
-
Pretty close to mine as well. - gcarpenter 11 years ago