getting table and column names from user in teradata

Database

getting table and column names from user in teradata

Requirement:
I need to perform dml statements in teradata by getting the table name from the user.
All this i'll be doing from unix script using teradata bteq utility.

Eg:

select * from ;
insert into (,,.....) values(....);

similarly for other DML statements where tablename is not hard-coded.

2 REPLIES

Re: getting table and column names from user in teradata


sorry:
select * from tablename;
insert into tablename (col1,col2,.....) values(....);

Re: getting table and column names from user in teradata

If you want to run dynamic SQLs check out dbc.SysExecSQL