Adding collection name to query

SELECT @CollectionID as ‘collection’, CS.Model0 as Model, COUNT(*) AS ‘Count’
FROM v_GS_COMPUTER_SYSTEM  CS
inner join v_R_System R on CS.ResourceID = R.ResourceID
inner join v_FullCollectionMembership FCM on FCM.ResourceID = R.ResourceID
Where FCM.CollectionID = @CollectionID
GROUP BY CS.Model0
ORDER BY CS.Model0

Leave a Reply

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