Tag Archives: SQL

SCCM Updates Supersedence

here is a quick and simple SQL query to determine what updates supersede and update.

Here is the code, just replace the articleID in the where statement with the update you want to look at.

select distinct
(select vui3.ArticleID + ',' as 'data()'
from v_UpdateInfo vui2
join v_CIRelationEx vre on vre.ToCIID = vui2.CI_ID
join v_UpdateInfo vui3 on vre.FromCIID = vui3.CI_ID
where vui2.CI_ID = vui.CI_ID and vre.RelationType = 6
group by vui3.ArticleID
order by vui3.ArticleID desc
for xml path('')
) as SupersededBy
from v_UpdateInfo vui
where vui.ArticleID = '4464217'