How to Modify the Report SQL Statement

Aplica-se a: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

Reports in Configuration Manager 2007 can be based on simple SQL statements or very complex ones that prompt the user for information, join several Microsoft SQL Server views, and use filters to limit the results. Use the following procedure to modify the SQL statement that is used in a report.

Procedure

How to modify the SQL statement in a report

  1. In the Configuration Manager console, navigate to System CenterConfiguration Manager / Site Database / Computer Management / Reporting / Reports.

  2. Right-click the report of your choice, and then click Properties.

  3. Click Edit SQL Statement to open the Report SQL Statement dialog box. The SQL statement for the report is listed in the SQL Statement pane.

  4. The SQL statement must be typed into the SQL statement text box. However, you can add a new view or column value to the SQL statement as follows:

    Add a SQL view:

    1. Click the location within the SQL statement to insert the new view.

    2. Select a view from the View list, and then click Insert.

    Add a column value:

    1. Click the location within the SQL statement to insert the new column value.

    2. Select the view from the View list, select the column from the Columns list, and then click Values.

    3. Select the value from the Values list, and then click OK. You can filter the values that are listed by clicking Set, selecting Apply a filter, and specifying a value for the Filter criterion. For more information about setting a filter, see Set Filter Dialog Box.

    noteNota
    Adding a new view or column value does not insert additional keywords or punctuation, even when they are required to make the SQL statement valid. You can use Query Designer to design the report SQL statement in a graphical user interface. For more information about how to use Query Designer to modify queries, see How to Use Query Designer to Create or Modify Report Queries.

  5. To add a prompt to the SQL statement, click Prompts. For more information about adding prompts to a SQL statement, see How to Create or Modify Report Prompts.

  6. Click OK, and then click OK again.

Consulte Também

For additional information, see Configuration Manager 2007 Information and Support.
To contact the documentation team, email SMSdocs@microsoft.com.

Conteúdo da Comunidade

Mostrar: