Subject Re: Newbie : Stored procedure to return multiple rows
Author Svein Erling
EXIT is something you use in executable stored procedures which you
can call with EXECUTE PROCEDURE.

You want a selectable stored procedure, and there you should use
SUSPEND and not EXIT and then call the stored procedure with a SELECT.

Set

--- In firebird-support@yahoogroups.com, "NextStepSolutions" wrote:
> Hi,
> I am trying a test stored procedure with Firebird to see if I can
> use it for development/testing.
> I want to call the procedure and have it return multiple rows from a
> select statement as works with Sybase.
>
> My test example is:
> SET TERM !!;
> CREATE PROCEDURE getnames
> RETURNS (title VARCHAR(10), forename VARCHAR(30), surname
> VARCHAR(30)) AS
> BEGIN
> FOR SELECT title, forename, surname
> FROM name
> INTO :title, :forename, :surname
> DO
> EXIT
> END !!
> SET TERM ;!!