This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SQL to PM Report - Can it be done or someone help?

Hello!

We've created a report that can show us machines that do not have a particular set of patches by KB number (i.e. a compliance report) in SQL.  Can we back convert it to a PM report, or can someone help us? 

The code is as follows:

SELECT DISTINCT

dbo.ComputerUpdateStatus.fulldomainname AS [Computer Name]

FROM dbo.ComputerUpdateStatus

WHERE dbo.ComputerUpdateStatus.fulldomainname NOT IN

(SELECT DISTINCT

dbo.ComputerUpdateStatus.fulldomainname AS [Computer Name]

FROM dbo.ComputerUpdateStatus

WHERE (

dbo.ComputerUpdateStatus.title LIKE '%KB4103718%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4103712%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4284826%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4338818%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4103716%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4284860%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4103723%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4284880%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4338814%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4103731%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4284874%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4338826%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4131372%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4284819%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4338825%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4103721%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4284835%'  ESCAPE '/' OR dbo.ComputerUpdateStatus.title LIKE '%KB4338819%'  ESCAPE '/'OR dbo.ComputerUpdateStatus.title LIKE '%KB4345420%'  ESCAPE '/')

AND dbo.ComputerUpdateStatus.UpdateInstallationState = 4)

ORDER BY dbo.ComputerUpdateStatus.fulldomainname

--dbo.ComputerUpdateStatus.title NOT IN ('KB4103718','KB4103712','KB4284826','KB4338818','KB4103716','KB4284860','KB4103723','KB4284880','KB4338814','KB4103731','KB4284874','KB4338826','KB4131372','KB4284819','KB4338825','KB4103721','KB4284835','KB4338819')