Archives of the TeradataForum
Message Posted: Tue, 24 Apr 2012 @ 22:32:35 GMT
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
|