PERIOD_OVERLAPS
functionsupportedCore SQL functionsReturns TRUE if two PERIOD values share any instant.
Syntax
PERIOD_OVERLAPS( <period1>, <period2> )
Parameters
| Name | Required | Description |
|---|---|---|
period1 | required | The first PERIOD value. |
period2 | required | The second PERIOD value. Must have the same element type as period1. |
Returns
BOOLEAN.
Usage notes
- TRUE when PERIOD_BEGIN(period1) < PERIOD_END(period2) and PERIOD_BEGIN(period2) < PERIOD_END(period1).
- Adjacent periods that meet at a shared boundary (for example, [a, b) and [b, c)) do not overlap.
- The function is symmetric: PERIOD_OVERLAPS(p1, p2) equals PERIOD_OVERLAPS(p2, p1).