Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 26 Nov 2007 @ 16:16:00 GMT


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


Subj:   Re: Between: not working as expected
 
From:   Geoffrey Rommel

The goal here, IMHO, is to find out what is actually stored in the database. Since Exit_date is a date column, it can't really have blanks; those are either nulls or some unusual date that has been changed to blanks by ODBC or something.

Probably the easiest way to find out the true contents of the column is this:

     select cast(cast(Exit_date as format 'YYYY-MM-DD') as char(10)) ...

This will work in BTEQ or SQL Assistant.

As others have pointed out, "X between A and B" is equivalent to "X >= A and X <= B". Once you know what is actually in the column, the behavior of Between should explain itself.



     
  <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