Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 24 Apr 2012 @ 22:32:35 GMT


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


Subj:   Variable name for a new or existing table?
 
From:   Farseth, Paul

Is it possible in Teradata SQL to retrieve a variable name for a table to be read from (or to be created) and then dynamically use that table name in a string of SQL instructions?

What I'd like to be able to do is select a table name from a parameters table and then use that name in a query to create a new version of a table with that name or to select data from a table of that name. A variant of this kind of procedure would be to use some other string of retrieved data from a source table or a current_date function to make up the character string in a SQL query that dropped or created a table named by that computed character string.


Thanks,

Paul Farseth
Minnesota Department of Human Services



     
  <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