Specifying an SQL WHERE Clause

You can enter any valid SQL WHERE clause expressions to specify an event group filter constraint.

Perform the following steps to specify an SQL WHERE clause:

  1. In the Add Event Group Filter or Edit dialog box for the event group, click the Add SQL button to activate the text entry section.
  2. Type your SQL expressions.
  3. Click OK to save your changes.

Example 1: 

The following example constraint list for an event group filter shows three constraints; the first two constraints were specified with the Constraint Editor, the third constraint was manually entered as a free-form SQL WHERE clause.

Attribute Operator Value
Source In NV6K, HPOV
Origin Like 146.84.%
hostname not in (select c.booted_os_name from computer_system c,
netware_server n where c.hardware_system _id=n.hardware_system id)

The resulting WHERE clause derived from these constraints is shown in the following example. This WHERE clause is displayed in the SQL section of the Create/Edit Event Group Filter dialog box. Notice the WHERE keyword and beginning and ending parentheses have been automatically added by the software.

Example 2: 

WHERE ((source IN ('NV6K', 'HPOV') AND (origin LIKE '146.84.%') AND (hostname not in (select c.booted_os_name from computer_system c, netware_server n where c.hardware_system-id=n.hardware_system id))