Subject | Re: [firebird-support] Multiple rows in a EXECUTE PROCEDURE |
---|---|
Author | Paul Vinkenoog |
Post date | 2012-08-19T02:00:36Z |
Hello Walter,
select identi, name from test
HTH,
Paul Vinkenoog
> With the following Stored Procedure:Since this is a selectable stored procedure, you should retrieve its output (a dataset) like this:
>
> 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?
select identi, name from test
HTH,
Paul Vinkenoog