Archives of the TeradataForum
Message Posted: Thu, 19 Jun 2003 @ 19:14:18 GMT
On Wed, 18 Jun 2003 11:35:15 -0500, Geoffrey Rommel wrote:
Intervals may not handle month calculations correctly.
If you do
date '2003-08-30' - INTERVAL '6' MONTH
It will generate 2003-02-30 which is an invalid date and the query will fail.
The second suggestion
is a TERADATA extension to the ANSI standard. It doesn't suffer from this because Teradata defined it to handle this correctly by reverting the invalid date to the closest valid date. Therefore for my example
would give 2003-02-28 which is valid and the query will work.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|