Re: Create Function IDS2000
Posted in 2000
Felice Caccamo wrote:
>
> Hi Everybody,
>
> I'm tring to create a particolary Fuction.
That sounds very painful! I would seek medical advice first. :-)
> its duty is this:
>
> CREATE FUNCTION funct1 (nometab)
> RETURNING char(2);
> CREATE TABLE nometab (colx INT);> RETURN 'OK';
> END FUNCTION;
>
> nometab = function's parameter.
>
> Then I would like to realize a function that will create a table with
> the same name of the
> function's parameter.
> Infact nometab is the function's parameter and when I will execute it :
> "execute functl(lavoro)"
> the Informix Server will create a new table lavoro.
As to dynamic SQL in fu.... procedures, you can't.
> Someone know an alternative way to do this ???
I guess you could send dynamically created SQL to dbaccess, but it gets
messy.
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /|
| http://www.informix.com http://www.informixhandbook.com |///// / //|
| http://www.iiug.org +-----------------------------------+//// / ///|
| |This email will self-destruct in |/// / ////|
| |10 sec. If you received this email |// / /////|
| |in error, sorry about the mess. |/ ////////|
+----------------------+-----------------------------------+-----------+