Information
Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see REORG PLUS for DB2 13.1.

predicate


A predicate is a comparison of a single column value to a constant or list of constants.

predicate.png

The column name identifies a column of the named table that is used in the comparison. You can specify the following comparison operators:

 

Operator

Meaning

<

Less than

< =

Less than or equal

< >

Not equal

=

Equal

¬ =

Not equal

> =

Greater than or equal

>

Greater than

IN

Equal to any

NOT IN

Not equal to all

constant

The constant specifies a value to be compared to the column value. REORG PLUS then evaluates the result based on the preceding relative operator. Observe the rules for constants in the following table. For the comparison, the associated constant must match the data type of the column (that is, numeric to numeric, string to string, and date/time to date/time).

You should avoid nonstandard comparisons. For more information, see rules for constants in the IBM Db2 SQL Reference.

If you specify a list of constants, you can improve performance by specifying the constants in ascending sequential order. When you specify the list in this order, you save processing time because REORG PLUS does not sort the list.

Type of constant

Additional details

Integer

Identical to Db2 SQL integer constants

The constant must be within the range of the column’s data type.

Decimal

Identical to Db2 SQL decimal constants

The constant must be within the range of the column’s data type.

Warning

Important

To determine whether your site has set the decimal point to a comma, check the Db2 subsystem DSNHDECP setting. To enable REORG PLUS to distinguish comma decimal points from comma separators, include a space after any comma that you use as a separator.

Information
Example

Example of using the comma as a decimal point:

SELECT * FROM owner.table

WHERE SALARY > 100,00
Information
Example

Example of using the comma as both a decimal point and a separator:

SELECT * FROM owner.table

WHERE SALARY IN (100,00, 200,00, 300,00)

Character string

Identical to Db2 SQL strings

Use ' ' to denote an empty string.

Warning

Important

REORG PLUS does not validate character data against CCSIDs.

Hexadecimal strings

Identical to Db2 SQL hexadecimal strings, except that string length is limited to 256 bytes

Warning

Important

  • REORG PLUS does not validate hexadecimal string data against CCSIDs.
  • REORG PLUS does not support the hexadecimal string constants BX'xxxx', UX'xxxx', or GX'xxxx'.

Graphic string

Limited to 256 bytes

Date/time string

With the following exceptions, identical to Db2 SQL date/time strings

Exceptions:

  • Use only ISO, USA, EUR, and JIS formats.
  • Precision on a timestamp constant must be less than or equal to the precision defined in the column.
Warning

Important

If you specify a time zone on a timestamp constant, this value overrides any value that you specify for the IMPLICIT_TZ option.

Floating point

Not supported

Decimal floating point

Not supported

Binary string

Not supported

LOB

Not supported

Row ID

Not supported

NULL

You can specify the keyword NULL as a constant for columns that can be set to null. NULL is generally used with the =, < >, ¬ =, IN, and NOT IN operators, but you can specify it with any of the allowed operators.

The null value is always higher than all other values. To bypass columns that allow nulls, specify AND¬ =NULL.

CURRENT DATE -labeledDuration

The CURRENT DATE option describes the current date or, optionally, describes the current date minus a duration in days, months, or years. The rules for date/time arithmetic using labeled durations are identical to the Db2 SQL rules stated in the IBM Db2 SQL Reference manual. The CURRENT DATE is taken from the local time-of-day clock during the UTILINIT phase.

CURRENT TIMESTAMP WITH TIME ZONE -labeledDuration

The CURRENT TIMESTAMP option describes the current timestamp. Optionally, you can include one of the following specifications with CURRENT TIMESTAMP:

  • WITH TIME ZONE to include the time zone (from the IMPLICIT_TZ option, described in IMPLICIT_TZ) in the timestamp
  • A duration (preceded by a minus sign) in days, months, or years, which results in the current timestamp minus that duration. The rules for date/time arithmetic using labeled durations are identical to the Db2 SQL rules stated in the IBM Db2 SQL Reference manual.

The CURRENT TIMESTAMP is taken from the local time-of-day clock during the UTILINIT phase.

 

 

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

REORG PLUS for DB2 11.2