Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
MTA asked how to write a stored procedure that takes an SQL statement as a parameter and returns its rows; EXECUTE IMMEDIATE gave syntax errors. Jonathan Leffler said this needs dynamic SQL, which SPL does not allow. Thomas Parsli first pointed to RETURN WITH RESUME, then conceded he had misread the question. An unrelated post asked about getmsg() polling in an ESQL/C client. Unresolved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
MTA — — source: Informix-list mailing list archive (1991-1998)
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
↪ replying to MTA
David J. Edgerton — — source: Informix-list mailing list archive (1991-1998)
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
↪ replying to MTA
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
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>
↪ replying to MTA
Thomas Parsli — — source: Informix-list mailing list archive (1991-1998)
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
↪ replying to Thomas Parsli
Thomas Parsli — — source: Informix-list mailing list archive (1991-1998)
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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.