Call stored procedures from other stored procedures
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Stored procedures and triggers can call other stored
procedures. Nesting procedures lets you take advantage of existing
procedures. Instead of rewriting the code, procedures can simply
issue CALL statements to the existing procedures.
Another use for nesting procedures is for assembling result sets
generated by queries on different databases into a single result
set. With this technique, the stored procedure processes multiple SELECT statements through
multiple instances of the SQLCursor class. For each
of the instances, the procedure uses the DhSQLResultSet class
to add rows to the result set returned by the procedure.
Note: You cannot call a stored procedure if the name of the stored procedure and the Table is
same.