Loading result sets into temp-tables
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Enhancements implemented through changes to the RUN
STORED-PROC statement allow you to retrieve result sets from
a foreign data source and load each result set, for which a temp-table handle
is defined, into its own temp-table. The LOAD_RESULT-INTO function
enables data retrieved to be loaded into temp-tables where the data
can then be manipulated, employing all characteristics inherent
to temp-tables. The capability to load result sets into temp-tables
is not limited by the parsing requirements associated with the proc-text-buffer nor
the database dependencies associated with views.
Temp-tables can provide data management capabilities associated with ABL directly to the result sets of a stored procedure, but completely independent of the foreign data source from which it was populated and/or derived. Temporary tables are effectively database tables in which OpenEdge stores data temporarily. Because temp-tables have the same support features that actual OpenEdge databases use, you can take advantage of almost all the OpenEdge database features that do not require data persistence and multi-user access. For example, you can define indexes for fields in the temp-table. For more information about temp-tables, see Develop ABL Applications.
RUN STORED-PROC statement with the LOAD-RESULT-INTO phrase
The following example shows how to use the RUN STORED-PROC statement with
the LOAD-RESULT-INTO phrase with a single dynamic temp-table. It highlights
the coding techniques discussed in Run Stored-Proc statement execution using the send-sql-statement option the and
it introduces the dynamic temp-table topic further discussed in later sections.
|