Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 11 Jun 2007 @ 20:06:15 GMT


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


Subj:   Re: Blanks and Coalesce behavior
 
From:   Michael Larkins

Castelli:

Remember that COALESCE only returns the first value that is not a null when examining a list of one or more data elements. It is difficult to tell what you mean by '', but it is not a null (normally designated as "?".

It has already been mentioned that ' ' and ' ' are the same or at least would be padded to the same length of 10 if compared. At the same time, I am curious to know if you are saying that COALESCE is truncating the 10 bytes of blank/space to 1 byte of space or zero bytes. If you are then I would have to ask how you know it is 1 or 0 bytes versus 10 bytes. Are you using LENGTH? If so, then you are using SQL ASSISTANT and it is converting LENGTH to CHARACTERS(TRIM(... Therefore, ' ' would have a length of zero and not 10. If you wish to see the true length use CHAR(... without the TRIM.


Regards,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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