Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Between Times not working - response (4) by mattie4

$
0
0
ASKME_CREAT_TM is a [TIME(0)] field.   I had posted the syntax wrong and corrected it below.    I can do CASE When AskME_CREAT_TM  09:00:00 for example, and it will show AM on any of the records where that is the time in that field.   But it keeps giving error for the Between times statement. All I'm wanting to do is show 'AM" in a colum when the time is between certain times in the ASKME_CREAT_TM field, e.g. 8-12 = AM.  And eventually 'PM' 'Late PM' etc.    .   I'm new to Teradata.  Thanks.      SELECT ASKME_CREAT_TM, Case CREAT_TM When ASKME_CREAT_TM Between ('08:00:00' and '12:00:00') Then 'AM' Else 'unknown' END AS TimeofDAY, FROM Table Where (ASKME_CREAT_DT) Between '2012-08-01' AND '2012-08-02' AND CMTMT_DT = CREAT_DT  

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>