Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 17 Jan 2004 @ 18:06:03 GMT


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


Subj:   Re: How to pass variable in Select
 
From:   ulrich arndt

Kris,

it depend on what you wane do and how you submit the query. In general does a macro work very well.

Pseudo code:

create macro  sel_tables
(
    databasename varchar(30)
)
as
(
select tablename
from dbc.tables
where databasename = :databasename
order by tablename
;
);

exec  sel_tables('dbc');

What is really nice is that you are also able to do some basic checks on the input parameters.

Have a look on the documentation or send me your SQL directly in case you have trouble.


Kind regards

Ulrich



     
  <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