How to run Dynamic query in informix spl
Posted in 2010
Topics: Stored Procedures & SPL
HI,
we are working on Informix client (SQL editor) 3.0. In the informix we are
creating procedures/functions, we have a requirement like in the
procedure/function we need to pass the table name dynamically through variable
for select query. Please help us asap.
For example
select * from @tabname
ABHISHEK ROY wrote:
> HI,
>
> we are working on Informix client (SQL editor) 3.0. In the informix we are
> creating procedures/functions, we have a requirement like in the
> procedure/function we need to pass the table name dynamically through
variable
> for select query. Please help us asap.
>
> For example
>
> select * from @tabname
What engine?
--
Cheers,
Obnoxio The Clown
http://obotheclown.blogspot.com
I will now proceed to pleasure myself with this fish.
--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.
You can only do dynamic SQL in a stored procedure in IDS 11.50, and there
are serious bugs in versions prior to 11.50xC4.
If you have 9.xx, 10.00, or 11.10 you can install the Exec Datablade and it
will give you some of that functionality through call to a library of UDR
functions that will implement your dynamic SQL. If you are running 7.xx or
earlier (though since you mention 'functions' that's unlikely) there's not
way to do this at all except to upgrade to 11.50.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Tue, Feb 16, 2010 at 8:43 AM, ABHISHEK ROY <abhishek.roy@invesco.com>wrote:
> HI,
>
> we are working on Informix client (SQL editor) 3.0. In the informix we are
> creating procedures/functions, we have a requirement like in the
> procedure/function we need to pass the table name dynamically through
> variable
> for select query. Please help us asap.
>
> For example
>
> select * from @tabname>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0023545bd49c66345f047fb8904d