Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Fri, 03 Feb 2012 @ 15:39:35 GMT


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


Subj:   Re: Use of Union with literals
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, February 03, 2012 10:26 -->

Hi Senthil,

It should be UNION instead of UNION ALL, since UNION ALL will show the duplicates which will be equivalent to twice the number of entries in dbc.tables.

A better way is to use something like this:

     Select 'GE' as name from (sel 1 as ax) a
     Union
     Select 'ME' as name from (sel 1 as ay)b;

or

     Select 'GE' as name from (sel current_date dt) a
     Union
     Select 'ME' as name from (sel current_date dt1)b;

Thanks.



     
  <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: 28 Jun 2020