Subject Re: Stored Procedure: Result set and out parameter
Author dvosp
Sure, I'm familiar with with select procedures, e.g. the following procedure will return a result set.

SET TERM ^ ;
CREATE PROCEDURE GETMESSAGES
RETURNS (
MSISDN Varchar(20),
MESSAGE_TEXT Varchar(200)
)
AS
BEGIN
FOR SELECT msisdn, message_text FROM message_table INTO :MSISDN, :MESSAGE_TEXT
DO
BEGIN
SUSPEND;
end
END^
SET TERM ; ^

and this procedure must be called by e.g
select * from getmessages

The other type of procedure returns a single value/row and is called with EXECUTE

From what I can gather, SQL Server and MySQL offers a combination of both in the same procedure.

So my question is, is this possible with firebird?

Pierre


--- In firebird-support@yahoogroups.com, "Leyne, Sean" <Sean@...> wrote:
>
> Pierre,
>
> > I need to implement a stored procedure that returns a result set and has an
> > output parameter.
> >
> > This is apparently supported in SQL server and MySQL.
> >
> > How can this be done in Firebird?
>
> The equivalent functionality in Firebird is known as a SELECTABLE procedure, please review the documentation/FAQ for details.
>
>
> Sean
>