Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Experiencing Challenges with TimeStamp in Teradata - response (1) by dnoeth

$
0
0

Both conditions are not exactly the same.
I assume those DATE_START/END_HIST columns are TIMESTAMPs (#2 should fail for DATEs).
#1: Compares a TIMESTAMP to a DATE, resulting in the TIMESTAMP is implictly CASTed to a DATE and thus the TIME part is truncated.
#2: Compares a TIMESTAMP with a literal, which is resolved to a timestamp by the parser (better write TIMESTAMP '2013-06-30 00:00:00.000' instead).
And there might be some TimeZones involved...
You should check both explains to see the actual comparison.
 
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles