According to my requirement,I am writaing a procedure using SPL for dynamically create a table,dynamically drop that table . Means,I am sending table name as parameter, procedure created but while executing no result,
see the following eg. this procedure did not work .
CREATE PROCEDURE proc1(tabname varchar(20))
CREATE TABLE tabname(column1 char(10))
pls help me
Pinned topic how to send a tablename as parameter in SPL routines
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2007-11-28T17:52:27Z at 2007-11-28T17:52:27Z by Kevin_Foster
Kevin_Foster 120000GMHC9 Posts
Re: how to send a tablename as parameter in SPL routines2007-11-28T17:52:27ZThis is the accepted answer. This is the accepted answer.The only way that I know of to do dynamic SQL in a SPL routine is through the Exec bladelet:
As an alternative, I'd probably collapse all of this information into one table like this:
create table mastertable (tabname varchar(20), column1 char(10));
create index masteridx on mastertable (tabname, column1);
especially considering that all of these "tables" have the same structure.