Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Fri, 22 Aug 2008 @ 10:28:39 GMT


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


Subj:   Re: How Can I Avoid Repeating an Expression?
 
From:   McCall, Glenn David

Basically give it a name and use the name in subsequent expressions.

For example:

     select 1 + 2 as sum1, sum1 + 4;

Gives:

     sum1        (sum1+4)
     3           7

If you can't afford to have the intermediate result come back to the user - simply do it in a derived table.


Hope this helps

Glenn Mc



     
  <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