Sample Queries for Application Management in Configuration Manager
Updated: January 1, 2014
Applies To: System Center 2012 Configuration Manager, System Center 2012 Configuration Manager SP1, System Center 2012 R2 Configuration Manager
The following sample queries demonstrate how to join the most common application management views to other views.
Joining Package and Program Deployment and Collection Views
The following query lists all package and program deployments by advertisement ID, advertisement name, and the collection that was targeted for the deployment. The v_Advertisement view is joined to the v_Collection view by using the AdvertisementID column.
SELECT ADV.AdvertisementID, ADV.AdvertisementName,
COL.CollectionID, COL.Name as CollectionName
FROM v_Advertisement ADV INNER JOIN v_Collection COL
ON ADV.CollectionID = COL.CollectionID
ORDER BY ADV.AdvertisementID