Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 20 Dec 2005 @ 11:47:47 GMT


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


Subj:   Re: NULLS to Spaces
 
From:   Appou, Kavitha

Hi,

Instead of writing COALESCE for 100 times or for all columns that have NULL values, You can use following query to get it done.

     select
     'COALESCE(' || trim(columnname) || ', '' '')'
     from dbc.columns
     where databasename='DBNAME'
     and tablename='TABLENAME'

Thanks,

Kavitha



     
  <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