Hello Walter,

> With the following Stored Procedure:
>
> SET TERM ^ ;
>
> CREATE PROCEDURE TEST
> RETURNS(
>   IDENTI TYPE OF COLUMN CLIENTS.CLI_IDENTI,
>   NAME   TYPE OF COLUMN CLIENTS.CLI_NAME)
> AS
>   DECLARE VARIABLE MYCOMMAND VARCHAR(80) ;
> BEGIN
>
>   MYCOMMAND = 'SELECT CLI_IDENTI, CLI_NAME FROM CLIENTS ORDER BY CLI_NAME' ;
>
>   FOR EXECUTE STATEMENT :MYCOMMAND INTO :IDENTI, :NAME DO
>     SUSPEND;
>
> END^
>
> SET TERM ; ^
>
> I get multiple rows when executing it with the "Execute" option of the SQL
> Manager. However just one row with ISQL or a program.
>
> EXECUTE PROCEDURE TEST;
>
> With ISQL or with a program the prior line show me just one row.
>
> Why that? And how can I get all the rows?

Since this is a selectable stored procedure, you should retrieve its output (a 
dataset) like this:

  select identi, name from test


HTH,
Paul Vinkenoog

Reply via email to