INTERVAL_ADD_UDF
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Definition
UDFs for the subtraction when one of its values is an interval and the other is a single access which is a reference to a column of type interval.
PUBLIC.INTERVAL_ADD_UDF
(INPUT_VALUE1 VARCHAR(), INPUT_PART1 VARCHAR(30), INPUT_VALUE2 VARCHAR(), INPUT_PART2 VARCHAR(30), OP CHAR, OUTPUT_PART VARCHAR())
Parameters
INPUT_VALUE1
VARCHAR
The value to be processed.
INPUT_PART1
VARCHAR
The time type, e.g. 'HOUR
'.
INPUT_VALUE2
VARCHAR
The column reference name, e.g. 'INTERVAL_HOUR_TYPE
'
INPUT_PART2
VARCHAR
The type of the column referenced.
OP
CHAR
The sign that is being evaluated.
OUTPUT_PART
VARCHAR
The output type.
Returns
A varchar
resulting from the subtraction of the intervals.
Migration example
Input:
INTERVAL_YEAR_TYPE - INTERVAL '7' HOUR
Output:
PUBLIC.INTERVAL_ADD_UDF(INTERVAL_YEAR_TYPE, 'YEAR', '07', 'HOUR', '-')
Last updated