Defining an SQL Query for a Filter
You can write an SQL query to define the resources that you want to include in the filter. You can write the SQL code from scratch. Alternatively, you can copy the SQL from another filter or report and modify it to suit your requirements. For example, you can create a resource query using the Query Builder, and then copy the generated SQL from the Resolved Query tab. You can also use the Query Builder to define the basic structure of your query, convert it to SQL, and then modify the SQL directly to create the query that you want.
You need the Edit SQL privilege to create or modify SQL queries, and you should have a good understanding of the CMDB table structure.
This task is a step in the process for creating or modifying a filter.
- To define an SQL query for a filter
- In the Symantec Management Console, on theManagemenu, clickFilters.
- In the left pane, click the filter that you want to modify.
- In the right pane, in theFilter Definitionpanel, specify the SQL query details on the appropriate tabs.Parameterized QueryThe SQL code for the query.Query ParametersThe parameters that are used in the query. These are internal parameters for SQL use, not user parameters.Parameters are not commonly used in filter queries, but may be useful for getting registry information. For example, an agent version number for an upgrade.Resolved QueryThe SQL code that is run on the CMDB to extract the filter results.
- ClickSave Changes.