Was this helpful?
Retrieving the Data
The retrieve cursor statement reads the next row of data (as specified in the declare statement) into the specified host variables. The syntax is:
## retrieve cursor cursor_name (variable {variable})
To detect the end of a table, use the inquire_ingres statement to determine the endquery status. For details about inquire_ingres, see INQUIRE_INGRES--Get Diagnostic Information.
The retrieve cursor statement is typically used within a program loop to processes a series of rows; using cursors you can only move forward through rows (or reposition to the top of the table by closing and reopening the cursor).
Last modified date: 06/10/2024