Archives of the TeradataForum
Message Posted: Fri, 02 Nov 2012 @ 20:48:37 GMT
< -- Anonymously Posted: Friday, November 02, 2012 13:39 -- >
The value '2012-02-20' isn't a date, it's a character string. The subtraction is triggering an implicit CAST to integer, attempting to do what you meant (though it would probably be better to just throw an error).
Use the proper constant format DATE'2012-02-20'.
Or explicitly CAST('2012-02-20' as DATE FORMAT 'YYYY-MM-DD').
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|