Stored Procedure returning records
Posted in 2000
Topics: Stored Procedures & SPL, Server Administration
I need to write a stored procedure that returns records.
The stored procedure must take the SQL sentence as a param and
executes it
but I don't know how implement it.
I have tried to create the stored procedure with the instructions
EXECUTE
and EXECUTE IMMEDIATE but dbaccess returns 'error syntaxis'
Can anybody help me
I'll be very grateful
Thank you very much
When profiling an application esql/c application running on a Solarus box, I noticed that the CPU stayed at 100% and a large percentage of that time was spent in the getmsg() Informix call. After reading the group, I've seen discussion that indicated the Server might be polling, but does anyone know if the general behavior for the client is to poll? If so, can it be configured not to? Thanks in advance, Dave Edgerton
MTA wrote: > I need to write a stored procedure that returns records. > The stored procedure must take the SQL sentence as a param and > executes it > but I don't know how implement it. This requires dynamic SQL. Dynamic SQL is not allowed in SPL. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN #include <disclaimer.h>
marotoQUITARNOSPAM@jazzfree.com (MTA) writes:
> I need to write a stored procedure that returns records.
> The stored procedure must take the SQL sentence as a param and
> executes it
> but I don't know how implement it.
> I have tried to create the stored procedure with the instructions
> EXECUTE
> and EXECUTE IMMEDIATE but dbaccess returns 'error syntaxis'
> Can anybody help me
>
> I'll be very grateful
>
> Thank you very much
Informix can help you -the have written some darn good papers called
"Documentation". -You should try reading it sometime:)
Guide to SQL: Syntax, September 1999
Page 3-52 (RETURN and RETURN WITH RESUME)
Thomas
Thomas Parsli <thomas.parsli@startsiden.no> writes:
> marotoQUITARNOSPAM@jazzfree.com (MTA) writes:
>
> > I need to write a stored procedure that returns records.
> > The stored procedure must take the SQL sentence as a param and
> > executes it
> > but I don't know how implement it.
> > I have tried to create the stored procedure with the instructions
> > EXECUTE
> > and EXECUTE IMMEDIATE but dbaccess returns 'error syntaxis'
> > Can anybody help me
> >
> > I'll be very grateful
> >
> > Thank you very much
>
> Informix can help you -the have written some darn good papers called
> "Documentation". -You should try reading it sometime:)
>
> Guide to SQL: Syntax, September 1999
> Page 3-52 (RETURN and RETURN WITH RESUME)
Two lessons learned:
1) Don't answer stuff like this while doing your taxes...
2) Understand the question before answering...
This is (of course) too dynamic, but maybe there's other solutions?
What are you trying to solve?
Thomas