For some administrators, creating queries in Microsoft SQL Server Query Designer is easier than creating them in Configuration Manager 2007. Use the following procedures to create and modify Configuration Manager report queries using Query Designer.

To create a new query in Query Designer

  1. Start Microsoft SQL Server Management Studio.

  2. Navigate to Computer Name \ Databases \ Configuration Manager database name \ Views.

  3. Right-click one of the views for the query, and click Open View to display the results pane.

  4. Press CTRL+1 to open the diagram pane, press CTRL+2 to open the criteria pane, and then press CTRL+3 to open the SQL pane.

  5. Right-click in the diagram pane (top center pane), click Add Table to open the Add Table dialog box, and click Views. While holding the CTRL key, select the Configuration Manager views to add to the query; click Add; and then click Close.

  6. Design and test the SQL statement using Query Designer. For more information about using Query Designer, search for Query Designer in the SQL Server 2005 Books Online (http://go.microsoft.com/fwlink/?LinkId=60544)

  7. When the query retrieves the desired data, copy the SQL statement from Query Designer and paste the query into the Report SQL Statement dialog box in the Configuration Manager report.

To modify a Configuration Manager report query in Query Designer

  1. Start Microsoft SQL Server Management Studio.

  2. Navigate to Computer Name \ Databases \ Configuration Manager database name \ Views.

  3. Right-click any views, and click Open View to display the results pane.

  4. Press CTRL+1 to open the diagram pane, press CTRL+2 to open the criteria pane, and then press CTRL+3 to open the SQL pane.

  5. Copy the SQL statement from the Configuration Manager report, and then paste the SQL statement into the SQL pane replacing the existing SQL statement currently in the pane. For more information about how to copy the SQL statement from a Configuration Manager report, see How to View the SQL Statement in a Report.

  6. Design and test the SQL statement using Query Designer. For more information about using Query Designer, search for Query Designer in the SQL Server 2005 Books Online (http://go.microsoft.com/fwlink/?LinkId=60544).

  7. When the query retrieves the desired data, copy the SQL statement from Query Designer and paste the query into the Report SQL Statement dialog box in the Configuration Manager report.

See Also