Try OpenEdge Now
skip to main content
DataServer for Oracle
RDBMS Stored Procedure Details : RUN STORED-PROCEDURE details : RUN STORED-PROCEDURE statement : LOAD-RESULT-INTO phrase
 
LOAD-RESULT-INTO phrase
The LOAD-RESULT-INTO function loads the result set into a temp-table only where <handle> is a variable of type handle. Note that handle can also be defined as extent to enable you to pass more than one temp-table handle in those instances where the SQL statement is defined to return more than one result set.
When used with the send-sql-statement or stored procedure to load a result set into a temp-table, this function carries an implicit CLOSE-STORED PROCEDURE statement. However, the use of this function is optional so existing applications will not be affected.
Note: The OpenEdge client issues an error at runtime if the variable of type handle with the LOAD-RESULT-INTO function does not point to a temp-table.
When used with the LOAD-RESULT-INTO phrase, the temp-table handle identifies the temp-table to which the result set will be loaded.
You can specify an array of one or more temp-table handle elements to retrieve stored procedure result sets and have the DataServer load the result set data directly into the associated temp-table(s). This approach allows you to have direct access to the fields defined in the temp-table.
The following types of temp-tables can support result sets:
*Static — A temp-table whose schema is defined at compile time.
*Dynamic — A temp-table whose schema is defined at run time. There are two types of dynamic temp-tables: dynamic-prepared and dynamic-unprepared.
For additional details about using the LOAD-RESULT-INTO phrase with the temp-table handle, see Loadingresults into a temp-table .