so i made a report to list all the software thats been installed in the last two days. but the boss when to the kace con in austin and they upgraded the version to 5.4 it worked before that but now i get an error in the sql. this is the sql im using

SELECT CONCAT(S.DISPLAY_NAME, ' ', S.DISPLAY_VERSION) AS 'Software',
 A.NAME as 'Computer', AH.TIME as 'Installed'
 FROM ASSET_HISTORY AH, ASSET A, ASSET_TYPE AST, SOFTWARE S
 WHERE AST.ASSET_CATEGORY = "Computer"
 and A.ID = AH.ASSET_ID
 and AH.DESCRIPTION LIKE CONCAT('%%Found software item ', S.DISPLAY_NAME,
 ' ', S.DISPLAY_VERSION, '%%')
 and DATE(AH.TIME) > DATE(DATE_SUB(NOW(), INTERVAL 1 DAY))
and S.DISPLAY_NAME NOT LIKE '%UPDATE%WINDOWS%'
 and S.DISPLAY_NAME NOT LIKE '%UPDATE%MICROSOFT%'
 and S.DISPLAY_NAME NOT LIKE '%Hotfix%MICROSOFT%'
 and S.DISPLAY_NAME NOT LIKE '%diskeeper%'
 ORDER BY Installed, Computer

worked on 12-12-12 now i get this error

mysql error: [1054: Unknown column 'AH.DESCRIPTION' in 'where clause'] in EXECUTE(
"SELECT CONCAT(S.DISPLAY_NAME, ' ', S.DISPLAY_VERSION) AS 'Software',
 A.NAME as 'Computer', AH.TIME as 'Installed'
 FROM ASSET_HISTORY AH, ASSET A, ASSET_TYPE AST, SOFTWARE S
 WHERE AST.ASSET_CATEGORY = "Computer"
 and A.ID = AH.ASSET_ID
 and AH.DESCRIPTION LIKE CONCAT('%%Found software item ', S.DISPLAY_NAME,
 ' ', S.DISPLAY_VERSION, '%%')
 and DATE(AH.TIME) > DATE(DATE_SUB(NOW(), INTERVAL 1 DAY))
and S.DISPLAY_NAME NOT LIKE '%UPDATE%WINDOWS%'
 and S.DISPLAY_NAME NOT LIKE '%UPDATE%MICROSOFT%'
 and S.DISPLAY_NAME NOT LIKE '%Hotfix%MICROSOFT%'
 and S.DISPLAY_NAME NOT LIKE '%diskeeper%'
 ORDER BY Installed, Computer LIMIT 0")

any ideas?

 

 

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

DESCRIPTION no longer exists in ASSET_HISTORY. It's been replaced by FIELD_NAME, VALUE1, VALUE2, and FRIENDLY_FIELD_NAME.

Answered 12/17/2012 by: dugullett
Red Belt

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