Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Tue, 25 Mar 2008 @ 13:21:50 GMT





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




Subj:   Re: Alias field into table
 
From:   Victor Sokovin



          > select field1 as "month"
          > from table a
  I need the alias "month" to be a variable, every end of month I want to run a query having a field with the name of the previous month, I wonder if it is possible.  


I don't think it is possible in pure SQL. You'll probably have to write a script which would build the SQL statement text dynamically before it is sent to the database.


Victor





     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 16 Nov 2008