/build/static/layout/Breadcrumb_cap_w.png

Anyone know how to modify this SQL report to only select a date range for when patches were installed? Ex: Report only patches deployed on 9/13/2012.

Select DISTINCT
    MACHINE.NAME as 'Machine Name',
    P.TITLE AS 'Patch Name',
    P.IDENTIFIER as 'KB Article',
    P.IMPACTID as 'Impact',
    if(P.IS_APP = '0', 'OS', 'Application') as 'Patch Type',
    S.STATUS_DT as 'Detect Date',
    S.DEPLOY_STATUS_DT as 'Deploy Date',
    S.DEPLOY_STATUS as 'Deployed'
from MACHINE
 join PATCHLINK_MACHINE_STATUS S on S.MACHINE_ID = MACHINE.ID
 join KBSYS.PATCHLINK_PATCH P ON P.UID = S.PATCHUID
 join PATCHLINK_PATCH_LABEL_JT PLJT ON P.UID = PLJT.PATCHUID
 join MACHINE_LABEL_JT MLJT ON MLJT.MACHINE_ID = MACHINE.ID
where MACHINE.ID = S.MACHINE_ID and S.PATCHUID = P.UID and MLJT.LABEL_ID = '323'
order by MACHINE.NAME desc, P.TITLE desc,S.STATUS_DT desc


0 Comments   [ + ] Show comments

Answers (1)

Posted by: dugullett 11 years ago
Red Belt
3

where  S.DEPLOY_STATUS_DT like '2012-09-13%' 


Comments:
  • I usually do something like this though. This will cover the past 30 days.

    where (S.DEPLOY_STATUS_DT > CURDATE() - INTERVAL 30 DAY) - dugullett 11 years ago

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