how to return a recordset from a informix stored procedure
Posted in 2008
Topics: SQL Development & Query Writing, Stored Procedures & SPL
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.
jeffhan said:
> 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.
RTFM.
http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp
--
Bye now,
Obnoxio
http://obotheclown.blogspot.com/
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.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...