|
Archives of the TeradataForumMessage Posted: Tue, 30 Oct 2012 @ 09:18:59 GMT
I am not sure about that; SEL CASE WHEN ( CAST('2012-02-22' AS DATE FORMAT 'YYYY-MM-DD') ,CAST('2012-02-25' AS DATE FORMAT 'YYYY-MM-DD') ) OVERLAPS ( CAST('2012-02-24' AS DATE FORMAT 'YYYY-MM-DD') ,CAST('2012-10-24' AS DATE FORMAT 'YYYY-MM-DD') ) THEN 'Overlaps' ELSE 'Doesnt Overlap' END ; gives Overlaps as we expect... Consider that for (s1,e1) the e1 is not part of the period - as it is true for period data types. -> first example '2012-02-23' does not overlap '2012-02-24' - '2012-10-23' -> but second example '2012-02-24' does not overlap '2012-02-24' - '2012-10-23' The interesting part is that period( CAST('2012-02-24' AS DATE FORMAT 'YYYY-MM-DD') ,CAST('2012-02-24' AS DATE FORMAT 'YYYY-MM-DD') ) is not valid ;->... shall we call it a feature... Ulrich
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||