Subject Re: [firebird-support] help me stored procedures coding
Author Artur Anjos
Luiz,

Some comments inside your code:

> CREATE PROCEDURE autores
/* As you can see here, your procedure will not return anything */
> AS
> BEGIN
> SELECT * FROM autor
/* The error you got is that you forgot the INTO clause and terminator here
*/
> /* Procedure body */
> SUSPEND;

/* If you remove your comment your line reads as:
SELECT * FROM autor SUSPEND;
*/

> END

If you want your procedure to return something from table autor you should
do something like:

CREATE PROCEDURE autores
RETURNS ( List of your variables to return here )
AS
BEGIN

/* If you are expecting multiple rows, put it on a for cicle */
FOR
SELECT BlaBlaBla FROM autor
/* Where do you want the return values to go */
INTO :YourVariable, :YourVariable2
DO
SUSPEND;
END

This is a bad example. You should find good examples in documentation.

Artur