SPL and parameters ...
Posted in 2000
Topics: Stored Procedures & SPL
Hi all,
How can I send a database name to a Stored Procedure in parameter ?
Something like that :
create procedure something(database_name char(18))
select * from database_name:systables;end procedure
TIA
Michel wrote:
> How can I send a database name to a Stored Procedure in parameter ?
>
> Something like that :
>
> create procedure something(database_name char(18))
> select * from database_name:systables;> end procedure
You can't. That qualifies as Dynamic SQL and SPL does not support
Dynamic SQL directly. If you have a 9.x server, you can get a datablade
which allows Dynamic SQL, but you have to create strings and process
them,
rather than writing a direct SQL statement as shown.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"