Last active
March 4, 2016 17:52
-
-
Save DarkAllien/5bf3900fc6900f05948a to your computer and use it in GitHub Desktop.
query - software updates - to be applied
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare @AuthListLocalID as int | |
select @AuthListLocalID=CI_ID from v_AuthListInfo | |
where CI_UniqueID=@AuthListID | |
SELECT distinct | |
ui.BulletinID, | |
ui.ArticleID, | |
ui.Title, | |
ui.Description, | |
ui.DateRevised, | |
CASE ui.Severity | |
WHEN 10 THEN 'Critical' | |
WHEN 8 THEN 'Important' | |
WHEN 6 THEN 'Moderate' | |
WHEN 2 THEN 'Low' | |
Else '(Unknown)' | |
END AS [Severity] | |
into #temp | |
FROM v_UpdateComplianceStatus ucsa | |
INNER JOIN v_CIRelation cir ON ucsa.CI_ID = cir.ToCIID | |
INNER JOIN v_UpdateInfo ui ON ucsa.CI_ID = ui.CI_ID | |
WHERE | |
cir.FromCIID=@AuthListLocalID | |
AND | |
cir.RelationType=1 | |
AND | |
ucsa.Status = '2' --Required | |
select distinct | |
bulletinid,articleid,title,description,daterevised,severity,ROW_NUMBER( ) over (order by severity,bulletinid) as [row] | |
from #temp order by row | |
drop table #temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment