• 1 reply
  • Latest Post - ‏2007-11-28T17:52:27Z by Kevin_Foster
228 Posts

Pinned topic how to send a tablename as parameter in SPL routines

‏2007-11-14T11:21:50Z |
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
Advanced Thanks
Updated on 2007-11-28T17:52:27Z at 2007-11-28T17:52:27Z by Kevin_Foster
  • Kevin_Foster
    9 Posts

    Re: how to send a tablename as parameter in SPL routines

    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.