Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 19 Mar 2008 @ 15:48:24 GMT


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


Subj:   Re: Comparing blanks and Nulls
 
From:   Anomy Anom

<-- Anonymously Posted: Wed, 19 Mar 2008 09:45 -->

You say "blank (non-null, non-spaces)" but there is no such thing. Teradata trims trailing spaces from VARCHAR fields and pads CHAR fields with trailing spaces. So there's effectively no difference between an "empty string" and a string containing only spaces.

You can certainly use a CASE statement to "translate" fields WHEN col1='' or CHARACTERS(col1)=0 or CHARACTERS(TRIM(col1))=0 or col1 IS NULL or whatever makes sense for your application.



     
  <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: 27 Dec 2016