Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Aug 2004 @ 13:32:24 GMT


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


Subj:   Re: Merging Result of two differnet query!
 
From:   Mishra, Tapas

Manish,

If I understand your requirement right then the following query will work.

     sel coalesce(dt1.dt,dt2.dt), dt1.col1, dt1.col2, dt2.col3, dt2.col4
     From
      dt1
     full outer join
      dt2
     on dt1.dt=dt2.dt

Where the dt1 and dt2 are the derived tables to hold the output of the two queries you have mentioned.

If you don't want the nulls against the columns col1, col2 etc. then you can put something like this coalesce(dt1.col1,'') In the query.



     
  <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