Subject Newbie : Stored procedure to return multiple rows
Author NextStepSolutions
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 ;!!

Unfortunately, I get this error:
Statement failed, SQLCODE = -104

Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 9, char 2
-END

I'm not a SQL guru and I have to admit I can't find the answer in the
docs :(
Can anyone help?

Andy