/build/static/layout/Breadcrumb_cap_w.png

Limit Application Patches to the last 6 months

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

0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
select UID from KBSYS.PATCHLINK_PATCH where ( KBSYS.PATCHLINK_PATCH.RELEASEDATE > DATE_SUB(CURDATE(), INTERVAL 6 MONTH))
Posted by: dugullett 11 years ago
Red Belt
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)

Posted by: jrasmussen 11 years ago
Senior Purple Belt
0

Figured it out, Answer Below

 

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ