select cir.FromCIID [New CI],
info.BulletinID [New BulletinID],
info.ArticleID [New ArticleID],
info.Title [New Title],
info.InfoURL [New InfoURL],
info.DatePosted [New DatePosted],
cir.ToCIID [SUPERSEDED CI],
info2.BulletinID [Superseded BulletinID],
info2.ArticleID [Superseded ArticleID],
info2.Title [Superseded Title],
info2.InfoURL [Superseded InfoURL],
info2.DatePosted [Superseded DatePosted]
from v_CIRelation cir
left join v_UpdateInfo info on cir.FromCIID = info.CI_ID
left join v_UpdateInfo info2 on cir.ToCIID = info2.CI_ID where RelationType = 6 ((info.ArticleID = @KBNumber) OR (info2.ArticleID = @KBNumber)) order by info.BulletinID, info.ArticleID

 

Leave a Reply

Your email address will not be published. Required fields are marked *