WHERE clause processing


Use WHERE clause processing to add criteria that trigger or prevent processing.

BMC AMI Utility Manager provides two sets of column variables:

  • Global (qualifier G)
  • Db2 RTS (qualifier A)

WHERE clauses are applicable to Exceptions and Criteria tables. The Exceptions table WHERE clause has only global variables because the product checks the Exceptions table before it checks the criteria.

For SQL statements in which you ordinarily use the IBM MOD function, you must use the operator // instead.


Examples

Valid WHERE clause:

WHERE DAYS(CURRENT DATE) // 2 = 1

Invalid WHERE clause:

WHERE MOD(DAYS(CURRENT DATE), 2) = 1

For more information, see  BMC-AMI-Utilities-SQL-language.

DO_WHERE and SKIP_WHERE functions

BMC AMI Utility Manager provides two functions for working with WHERE clauses: DO_WHERE and  SKIP_WHERE.

You can use these functions instead of using G.NEEDS_REORG or using AND NOT.

DO_WHERE

DO_WHERE(A.NACTIVE < 540 AND EXTENTS > 1)

SKIP_WHERE

 SKIP_WHERE(A.NACTIVE < 8)


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*