Subject | Re: [firebird-support] Newbie : Stored procedure to return multiple rows |
---|---|
Author | Martijn Tonies |
Post date | 2004-03-01T13:11:54Z |
Hi,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I am trying a test stored procedure with Firebird to see if I can useSUSPEND;
> 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
>>> remove this line > EXITWith regards,
> 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
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com