Subject | Re: [firebird-support] Multiple rows in a EXECUTE PROCEDURE |
---|---|
Author | W O |
Post date | 2012-08-20T21:55:49Z |
RIGHT!!!
Thank you very much.
Walter.
Thank you very much.
Walter.
On Sat, Aug 18, 2012 at 10:00 PM, Paul Vinkenoog <paul@...> wrote:
> **
>
>
> 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
>
>
>
[Non-text portions of this message have been removed]