Archives of the TeradataForum
Message Posted: Tue, 31 Oct 2012 @ 01:06:13 GMT
| Subj: || || Re: Date conversion not working |
| From: || || Walter, Todd |
Your inner cast changes a char to a date using a format string. Your outer cast changes a date to a date which actually requires no format. The
cast in the where clause has the same issue, the format is extraneous.
If you want to compare as character strings with a format, then the outer cast needs to cast to char with the format specified - but this is
not necessary for date compares since date data type has no formatting internally.
In your first query, remove the outer cast and format and your where clause should work fine.