home | home
Filtro de datos a desplegar
Establece el subconjunto válido de registros de la lista que deben ser desplegados

SQL Filters

SQL filters are text strings that you use to specify a subset of the data items in an internal or SQL database data type. The syntax for the filter is derived from the SQL WHERE clause. For internal data types, the filter is processed internally by the policy engine. For SQL database data types, the filter is passed to the underlying database for processing.

You use SQL filters when you do the following:

  • Retrieve data items from an internal or SQL database data type using GetByFilter
  • Retrieve a subset of linked internal or SQL database data items using GetByLinks
  • Perform batch updates or deletes on SQL database data types
  • Delete individual data items from an internal or SQL database data type
  • Call a database function
  • Specify which data items appear when you browse an internal or SQL database data type in the Netcool/Impact GUI

Syntax

For SQL database data types, the syntax of the SQL filter is the contents of an SQL WHERE clause specified in the format provided by the underlying database.

For internal data types, the syntax is as follows:

Field Operator Value [AND | OR | NOT (Field Operator Value) ...]

where Field is the name of a data type field, Operator is a comparative operator, and Value is the field value.

Note that for both internal and SQL data types, you must enclose internal string literals in single quotations marks. Double quotation marks are interpreted by the policy engine before it processes the SQL filter. Using double quotation marks inside an SQL filter will cause parsing errors.

Comparative Operators

The SQL filter syntax supports the following comparative operators: >, <, =, <=, <=, !=, NOT and LIKE. The LIKE operator can be used with regular expressions as supported by the underlying data source.

Boolean Operators

The SQL filter syntax supports the AND, OR and NOT boolean operators.

Order of Operation

You can specify the order in which expressions in the SQL are evaluated using parentheses.

Examples

The following is an example of a mediator filter:

Location = ’NYC’
Location LIKE ’NYC.*’
Facility = ’Wandsworth’ AND Facility = ’Putney’
Facility = ’Wall St.’ OR Facility = ’Midtown’
NodeID >= 123345
NodeID != 123234