Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 21 Jul 2004 @ 10:19:01 GMT


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


Subj:   Re: Is there an equivalent of DUAL in Teradata
 
From:   Victor Sokovin

Michael,

  Your statement is true only when the SELECT references only literal(s) while using a Set operator. However, I would have to wonder why anyone would do that when using searching for specific literal values using a WHERE clause is so much more efficent. It uses less SPOOL space and less processing power to find what is being requested (no merge processing required)  


  So based on efficiency, back to my original (and correct) statement, if you use a iteral and any column from any table while performing a UNION, MINUS, EXCEPT or NTERSECT - the FROM is optional.  



I think we have moved away from the context of the original question, which was about an equivalent of Oracle DUAL in TD. Oracle DUAL is used exactly for selecting literals, so I thought they were relevant in this context. I for one cannot avoid using derived or usual tables when I have to use the set operations with such literals in one statement and other literals or columns in the other statement.

This is in fact just a short summary of the other thread I quoted. There are more examples there. I hope this clarifies my statement.


Regards,

Victor



     
  <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