Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 07 Oct 2008 @ 15:14:07 GMT


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


Subj:   Re: BTEQ Export - concatenating null values
 
From:   Alves, Patrick

HEllo

of course, you need to have the same datatype between your null value and the value that you replace with.

For exemple :

coalesce ( field1,'') -> field1 must have a char or varchar datatype

you can't do colaesce( field2,'') if filed2 is a number

=> in this case, replace with

     case when field2 is null
          then ''
          else cast(field2 as varchar(n))
          end.

regards.

Patrick
TD Consultant.



     
  <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