Re: Using variable as table name in a stored procedure ?
Posted in 2001
Topics: Stored Procedures & SPL
Hi
You can use the SET type to achive the same
functionality in the 9.2x releases. You can pass the
SET type as a parameter to the SPL routine and use the
Collection Derived Type notation to access them using
a cursor.
Eg:
CREATE PROCEDURE xyz(x SET(smallint not null))
RETURNING something;
FOREACH SELECT * FROM TABLE(x)
Do Something
END FOREACH;
RETURN something;
----
Hope it helps.
Radha.
--- Jerzy Tomasik <jerzy.tomasik@ti.com> wrote:
> Thanks for the info. I'll give it a try.
>
> Jerzy
>
> Paul Watson wrote:
>
> > Download Paul Browns Dynamic-SPL bladelet from
> www.iiug.org (won't allow you
> >
> > to drop dynamically named tables though)
> >
> > This should probably be in the FAQ??
> >
> > > -----Original Message-----
> > > From: Andrew Hamm
> [mailto:ahamm@sanderson.net.au]
> > > Sent: Wednesday, January 31, 2001 3:35 AM
> > > To: informix-list@iiug.org
> > > Subject: Re: Using variable as table name in a
> stored procedure ?
> > >
> > >
> > > Jerzy Tomasik wrote in message
> <3A7774FF.5ADE4AC5@ti.com>...
> > > >Is there a way to pass and use a table name as
> a variable in a stored
> > > >procedure?
> > >
> > > Not in ordinary stored procedures - ie the ones
> from engines
> > > 5.XX to 7.XX
> > >
> > > I hear people mumbling about UDR's in the 9.XX
> or 2000 engines...
> > >
> > >
> > >
>
=====
Rajagopalan Radhakrishnan
radkrish_r@yahoo.com
radkrish@hotmail.com
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/