You can translate the question and the replies:

Calling a Custom Stored Procedure from a Custom Stored Procedure

I want to know if it is possible to calling an existing custom stored procedure from a new custom stored procedure. I have tried calling a custom function from custom stored procedure and it works well.
27-12-2017 00:06:12 -0500

2 Answers

Hi, If you are referring to including a reference to another stored procedure within the Java source code of your custom stored procedure, that is possible as long as you've already created the stored procedure with the same name in your Denodo Virtual Database. For example, the code snippet below (from the doCall() method of a sample Stored Procedure), is perfectly valid as long as the **differentStoredProcedure** has already been imported to the target VDB. ``` String query = "CALL differentStoredProcedure(" + input + ")"; rs = this.environment.executeQuery(query); if ( { return = rs.getString(1); } getProcedureResultSet().addRow(new Object[] { new String(return)}); ``` If you are referring to calling one stored procedure from within another stored procedure in a single VQL statement, then you'll need to create some views to represent the results of the two procedures and create a join between them. See this prior question, ["Calling a Stored Procedure within another Stored Procedure"]( for more details about that approach. Hope this helps!
Denodo Team
27-12-2017 18:34:40 -0500
I was refereing to the java code of custom stored procedure and calling it the way you mentioned works. Thanks
 Edited on: 02-01-2018 11:11:03 -0500
You must sign in to add an answer. If you do not have an account, you can register here