OVERLAPS
Translation reference to convert the Teradata operator OVERLAPS to Snowflake Scripting.
Description
According to Teradata's documentation, the OVERLAPS operator compares two or more period expressions. If they overlap, it returns true.
For more information regarding Teradata's OVERLAPS, check here.
period_expression
OVERLAPS
period_expression
The PERIOD_OVERLAPS_UDF is a Snowflake implementation of the OVERLAPS operator in Teradata.
Sample Source Pattern
Teradata
SELECT
PERIOD(DATE '2009-01-01', DATE '2010-09-24')
OVERLAPS
PERIOD(DATE '2009-02-01', DATE '2009-06-24');
Snowflake Scripting
SELECT
PERIOD_OVERLAPS_UDF(
ARRAY_CONSTRUCT(
PERIOD_UDF(DATE '2009-01-01', DATE '2010-09-24'),
PERIOD_UDF(DATE '2009-02-01', DATE '2009-06-24')
)
);
Known Issues
1. Unsupported Period Expressions
The PERIOD(TIME WITH TIME ZONE) and PERIOD(TIMESTAMP WITH TIME ZONE) expressions are not supported yet.
Related EWIs
MSCEWI1020: Custom UDF inserted.
Last updated
Was this helpful?