Subject | Multiple rows in a EXECUTE PROCEDURE |
---|---|
Author | W O |
Post date | 2012-08-19T01:01:49Z |
Hello everybody
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?
Thanks in advance.
Walter.
[Non-text portions of this message have been removed]
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?
Thanks in advance.
Walter.
[Non-text portions of this message have been removed]