Archives of the TeradataForum
Message Posted: Mon, 20 Dec 2004 @ 15:01:09 GMT
| Subj: || || Re: Interval in a where clause |
| From: || || Victor Sokovin |
,(EndDateTime - StartDatetime) DAY(4) as Difference
Where Difference <= 7
| ||Now this returns a 5407 error which is expected because the result set is an INTERVAL|| |
Try to "extract" the days from the interval:
where EXTRACT(DAY from (Second_EntryDateTime - First_EntryDateTime DAY(4)=)) <= 7 .
In a similar way it is possible to extract all elements from dates and intervals.