I have gone thorugh and made some minor edits to the SQL code manually to get a smart label to only show me the App patches for about 15 pieces of software, as long as it is not superceded.

I would like to further limit this with some code to say dont show anything over 6 months old. I know the KACE uses MYSQL so will a chunk of code like this work?

where post_date > DATE_SUB(GETDATE(), INTERVAL 6 MONTH)

or is the Kace not going to know what I am asking for.
I just dont want to use a set date like I am asked for in the Smart Label context because
I will have to change it manually every few months to keep it from downloading a mass ammount
of old patch files
Answer Summary:
select UID from KBSYS.PATCHLINK_PATCH where ( KBSYS.PATCHLINK_PATCH.RELEASEDATE > DATE_SUB(CURDATE(), INTERVAL 6 MONTH))
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

I would try something like this. I've used it before on machine patches, but never for patches. I would think it would still work though.

where (post_date > CURDATE() - INTERVAL 6 MONTH)

Answered 09/13/2012 by: dugullett
Red Belt

Please log in to comment
0

Figured it out, Answer Below

 

select UID from KBSYS.PATCHLINK_PATCH where (  KBSYS.PATCHLINK_PATCH.RELEASEDATE > DATE_SUB(CURDATE(), INTERVAL 6 MONTH))

Answered 09/13/2012 by: jrasmussen
Senior Purple Belt

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

Share