INTERVAL_ADD_UDF (VARCHAR, VARCHAR, VARCHAR, VARCHAR, CHAR, VARCHAR)
Definition
This user-defined function (UDF) is used to add or subtract intervals with a specific time type.
Parameters
INPUT_VALUE1
VARCHAR
The quantity referenced to a time type.
INPUT_PART1
VARCHAR
The time type of the INPUT_VALUE1
. E.g.: HOUR
.
INPUT_VALUE2
VARCHAR
The second quantity referenced to a time type.
INPUT_PART2
VARCHAR
The time type of the INPUT_VALUE2
. E.g.: HOUR
.
OP
CHAR
The operation. I can be a '+' or a '-'.
OUTPUT_PART
VARCHAR
The time type of the output operation.
Returns
Returns a varchar with the result of the indicated operation and values.
Usage example
Input:
Output:
Last updated