Re: Informix Stored Procedures
Posted in 1997
Topics: Stored Procedures & SPL, Jobs, Consulting & Announcements
Woodson Martin <73004.2067@CompuServe.COM> wrote in article
<5gbnfp$55p$1@mhadf.production.compuserve.com>...
> I am trying to find out if I can use Informix Stored Procedures
> to return a result set like I can with Sybase SQL Server, MS SQL
> Server, or now Oracle. I can't find anything on this in the
> informix ODS documention. If anyone who can help with the
> following questions, I would really appreciate it.
Assume:
CREATE TABLE foo_tab ( foo_col INT);
CREATE PROCEDURE foo_proc () RETURNING INT; DEFINE local_col INT;
FOREACH SELECT foo_col INTO local_col FROM foo_tab
RETURN local_col WITH RESUME;
END FOREACH;
END PROCEDURE;
Now You could substitute
SELECT foo_col FROM foo_tab
with
EXECUTE PROCEDURE foo_proc()
The only (but serious) distinction are missing column labels in this
'procedure result set'.
Hope it helps.
--
,,Perfection is achieved only in the point of collapse." (C.N.Parkinson)
Andreas Schubert, mailto:aschub@sax.sax.de