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. 

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

3

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'

 

Answered 11/28/2012 by: chucksteel
Red Belt

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