Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 22 Nov 2007 @ 14:56:26 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Between: not working as expected
 
From:   Anomy Anom

<-- Anonymously Posted: Wed, 21 Nov 2007 09:28 -->

BETWEEN includes equality for both values. And if Exit_Date is actually a date field, it's a bad idea to compare with a character string. Use a date constant instead like: date'1900-01-01' or if you like to type lots of extra characters then: cast('1900-01-01' as date format 'yyyy-mm- dd')

If you insist on using a character string, it should match the FORMAT of the column you are comparing with, which seems to be 'mm/dd/yyyy'

Also you should do a SHOW on the SELECT statement to confirm the table/view definitions are what you think they are.



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023