Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 06 Oct 2008 @ 21:36:44 GMT


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


Subj:   Re: BTEQ Export - concatenating null values
 
From:   Michael Larkins

Schabek:

It is a fact that concatenating a null will result in a null the same as doing math with a null will yield a null result. Have you ever heard of COALESCE? Its job is to convert a null value to something that is not null.

Try this one:

     SELECT COALESCE('A',' ')||';'||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'
     ||COALESCE(NULL,' ')||';'||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'
     ||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'||COALESCE('A',' ')||';'
     ||COALESCE('A',' ')||';'||COALESCE('A',' ')
     (TITLE  '')

Hope this helps,

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