Date and time durations
The BMC AMI Utilities SQL language supports the following types of durations:
Labeled durations
Durations labeled in accordance with the BMC AMI Utilities SQL language are large integers. In contrast, IBM Db2 internally treats labeled durations as DECIMAL(15,0) numbers.
In the BMC AMI Utilities SQL language, applying a labeled duration to a numerical expression whose type is not a large integer causes a syntax error. To correct the error, you can apply the INTEGER-or-INT function on the expression, before the labeled duration.
Date durations
BMC AMI Utilities can treat any DECIMAL(8,0) or DECIMAL(9,0) field as a date duration. Date durations can be negative or positive, and you can use them to decrement or increment DATEs, respectively.
Time durations
BMC AMI Utilities can treat any DECIMAL(6,0) or DECIMAL(7,0) field as a TIME duration.
Timestamp durations
BMC AMI Utilities can treat any DECIMAL(20,6) or DECIMAL(21,6) field as a TIMESTAMP duration.