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

Comments

Please log in to comment

Answers

3

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

Answered 09/13/2012 by: dugullett
Red Belt

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

    where (S.DEPLOY_STATUS_DT > CURDATE() - INTERVAL 30 DAY)
Please log in to comment
Answer this question or Comment on this question for clarity