Common Set Syntax:
READ
[(limit)]
RESULT
SET
result-set INTO
|
VIEW
view-name
|
FROM
ddm-name
|
||
parameter | ||||
[GIVING [:]
sql-code]
|
||||
END-RESULT
|
Extended Set Syntax:
READ
[(limit)]
RESULT
SET
result-set INTO
|
VIEW
view-name
|
FROM
ddm-name
|
||
parameter | ||||
[WITH INSENSITIVE
SCROLL [:] scroll-hv] |
||||
[GIVING [:]
sql-code]
|
||||
[WITH ROWSET
POSITIONING FOR
|
[:] row_hv | ROWS ]
|
||
integer | ||||
END-RESULT
|
This document covers the following topics:
For an explanation of the symbols used in the syntax diagram, see Syntax Symbols.
Belongs to Function Group: Database Access and Update
See also READ RESULT SET - SQL in the Natural for DB2 part of the Database Management System Interfaces documentation.
The SQL statement READ RESULT SET
can only be used in
conjunction with a CALLDBPROC
statement. It is
used to read a result set which was created by a stored procedure that was
invoked by a previous CALLDBPROC
statement.
This statement is available only with Natural for DB2.
limit
|
Limit Option:
You can limit the number of rows to be read. You can specify the
limit either as a numeric constant ( |
---|---|
result-set
|
Result Set:
As result-set you specify a result-set locator variable filled by a
preceding Note: |
FROM
ddm-name
|
DDM Name:
As |
WITH INSENSITIVE SCROLL [:] scroll_hv |
WITH
INSENSITIVE SCROLL Clause:
This clause belongs to the SQL Extended Set. Using this clause causes the application to use an
insensitive scrollable cursor to access the result set created by the
previously invoked stored procedure. In order to use this clause, the stored
procedure must have created the result set with a scrollable cursor. The
If the The processing will be terminated, if the application
issues an If the |
GIVING
sqlcode
|
GIVING
sqlcode Clause:
This clause may be used to obtain the SQL code of the SQL "fetch" operation used to process the result set. If this clause is specified and the SQL code of the SQL operation
is not The sqlcode field has to be a variable of format/length I4. If the |
WITH ROWSET POSITIONING FOR ...
ROWS |
WITH ROWSET POSITIONING FOR ... ROWS Clause:
This clause belongs to the SQL Extended Set. Using this clause causes the application to use an insensitive
scrollable cursor to access the result set created by the previously invoked
stored procedure. In order to use this clause, the stored procedure must have
created the result set with a scrollable cursor. The
If the The processing will be terminated, if the application issues an
If the |
END-RESULT
|
End of READ RESULT SET Statement:
The Natural reserved keyword |
See the example in
the CALLDBPROC
statement.
In addition, see the corresponding Natural database interface documentation.