Subject Re: Newbie : Stored procedure to return multiple rows
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, "NextStepSolutions"
<nextstepsolutions@y...> wrote:
> 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 BEGIN
> SUSPEND;
> END
> END !!
> SET TERM ;!!
>
>
> This is recognised as a valid stored procedure by iSql, but only
> returns one row.
> I was hoping to get all rows from the table - is it SUSPEND that is
> causing it to stop after just one row?

No, it was Andy, who performed "Execute Procedure getnames" instead
of "Select * From Procedure getnames" ;)

Best regards,
Alexander.