Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to return a recordset from a informix stored procedure

1,017 views
Skip to first unread message

jeffhan

unread,
Aug 1, 2008, 6:32:43 PM8/1/08
to
i was trying to create a stored procedure on our informix server as
below:

CREATE PROCEDURE "XTREME2003".procedure1(param decimal(19,4))
select * from "XTREME2003"."Account" where amount = param;
END PROCEDURE;
@

Then i got this error:
INTO TEMP table required for SELECT statement.

What's way in informix to return a recordset like this?
In oracle we return cursor, in sql server we directly use select, what
about informix?

thanks for any help.

Obnoxio The Clown

unread,
Aug 1, 2008, 6:38:39 PM8/1/08
to jeffhan, inform...@iiug.org

Fernando Nunes

unread,
Aug 1, 2008, 7:11:38 PM8/1/08
to

FOREACH ...
RETURN ... WITH RESUME
END FOREACH

But you should RTFM, where F stands for fabulous/friendly/famous/free ...

http://publib.boulder.ibm.com/infocenter/idshelp/v115/topic/com.ibm.sqlt.doc/sii-11-17102.htm#sii-11-17102

Regards

--
Fernando Nunes
Portugal

http://informix-technology.blogspot.com
My email works... but I don't check it frequently...

jeffhan

unread,
Aug 5, 2008, 12:46:54 PM8/5/08
to
On Aug 1, 4:11 pm, Fernando Nunes <domusonl...@gmail.com> wrote:
> jeffhan wrote:
> > i was trying to create a stored procedure on our informix server as
> > below:
>
> > CREATE PROCEDURE "XTREME2003".procedure1(param decimal(19,4))
> >   select * from "XTREME2003"."Account" where amount = param;
> > END PROCEDURE;
> > @
>
> > Then i got this error:
> > INTO TEMP table required for SELECT statement.
>
> > What's way in informix to return a recordset like this?
> > In oracle we return cursor, in sql server we directly use select, what
> > about informix?
>
> > thanks for any help.
>
> FOREACH ...
>         RETURN ... WITH RESUME
> END FOREACH
>
> But you should RTFM, where F stands for fabulous/friendly/famous/free ...
>
> http://publib.boulder.ibm.com/infocenter/idshelp/v115/topic/com.ibm.s...

>
> Regards
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...

Thanks for both of your response!

Unfortunately, i've checked the information centre for a long time and
didn't find any solution. The example IBM gave is a typical DML with
parameter in the stored procedure.

0 new messages