Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Mar 2004 @ 10:18:11 GMT


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


Subj:   Re: Populating one column with data from either of two table.
 
From:   Barbara George

Two options come to mind, if I have understood the question:

1. Coalesce(col1, col2) - if col1 is not null then use col1 else use col2

2. Case when (condition1) then col1 else col2 end


The 'case' option can be included in an aggregate function such as sum(), max()


Barbara



     
  <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