Added Collection

Select Distinct
    sys.Netbios_Name0,
    fcm.SiteCode, 
    sys.User_Domain0,
    sys.User_Name0,
    sys.Operating_System_Name_and0,
    arp.DisplayName0,
    Col.Name
FROM
    dbo.v_R_System sys
    JOIN dbo.v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
    JOIN dbo.v_FullCollectionMembership fcm on sys.ResourceID=fcm.ResourceID
    join dbo.v_Collection Col on Col.CollectionId = fcm.CollectionID
WHERE
    DisplayName0 = @displayname and
    fcm.CollectionID=@CollID

Leave a Reply

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