PERIOD_OVERLAPS_UDF

Definition

User-defined function (UDF) that reproduces the OVERLAPS OPERATOR to compare two or more period expressions and indicate if all expressions overlap with each other.

PERIOD_OVERLAPS_UDF(PERIODS ARRAY)

Parameters

PERIODS ARRAY

All the period expressions to be compared.

Returns

TRUE if all period expressions overlap, otherwise FALSE.

Migration example

Input:

IN -> Teradata_01.sql
SELECT 
	PERIOD(DATE '2009-01-01', DATE '2010-09-24') 
	OVERLAPS 
	PERIOD(DATE '2009-02-01', DATE '2009-06-24');

Output:

OUT -> Teradata_01.sql
SELECT
	PUBLIC.PERIOD_OVERLAPS_UDF(ARRAY_CONSTRUCT(PUBLIC.PERIOD_UDF(DATE '2009-01-01', DATE '2010-09-24') !!!RESOLVE EWI!!! /*** SSC-EWI-TD0053 - SNOWFLAKE DOES NOT SUPPORT THE PERIOD DATATYPE, ALL PERIODS ARE HANDLED AS VARCHAR INSTEAD ***/!!!, PUBLIC.PERIOD_UDF(DATE '2009-02-01', DATE '2009-06-24') !!!RESOLVE EWI!!! /*** SSC-EWI-TD0053 - SNOWFLAKE DOES NOT SUPPORT THE PERIOD DATATYPE, ALL PERIODS ARE HANDLED AS VARCHAR INSTEAD ***/!!!)) !!!RESOLVE EWI!!! /*** SSC-EWI-TD0053 - SNOWFLAKE DOES NOT SUPPORT THE PERIOD DATATYPE, ALL PERIODS ARE HANDLED AS VARCHAR INSTEAD ***/!!!;

Last updated