Loading a result set into a temp-table
- Last Updated: June 6, 2024
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
Enhancements implemented through changes to the RUN
STORED-PROC statement allow you to retrieve a result set
from a foreign data source and load the 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.
Using the RUN STORED-PROC statement with a LOAD-RESULT-INTO phrase
This example introduces 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 the RUN STORED-PROC statement with send-sql-statement option and introduces the dynamic temp-table topic further discussed in this section.
|