Hi Dieter,
Thanks for the solution.
Sorry for my ignorance and If you dont mind could you please explain the solution provided by you or please point to the appropriate manual.
WITH cte(grpcol,pd) AS (
SELECT grpcol, PERIOD(from_dt,to_dt)
FROM date_range_test )
SELECT *
FROM TABLE ( TD_SYSFNLIB.TD_NORMALIZE_OVERLAP_MEET(NEW VARIANT_TYPE(cte.grpcol),
cte.pd)
RETURNS (grpcol INT, pd PERIOD(DATE), cnt INT) HASH BY grpcol LOCAL
ORDER BY grpcol, pd ) AS dt
ORDER BY 1,2;
Thanks.
Hi Dieter,
Thanks for the solution.
Sorry for my ignorance and If you dont mind could you please explain the solution provided by you or please point to the appropriate manual.
WITH cte(grpcol,pd) AS (
SELECT grpcol, PERIOD(from_dt,to_dt)
FROM date_range_test )
SELECT *
FROM TABLE ( TD_SYSFNLIB.TD_NORMALIZE_OVERLAP_MEET(NEW VARIANT_TYPE(cte.grpcol),
cte.pd)
RETURNS (grpcol INT, pd PERIOD(DATE), cnt INT) HASH BY grpcol LOCAL
ORDER BY grpcol, pd ) AS dt
ORDER BY 1,2;
Thanks.