使用select语句调用两个过程 [英] call two procedures using select statement

查看:121
本文介绍了使用select语句调用两个过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 如何如何在中调用两个过程  代码关键字">选择查询,例如:- SELECT  sp_get_input_xml(:in_request_oid,:in_contract_oid,:in_contract_type,:out_input_xml),sp_get_output_xml(:in_request_oid, :in_contract_oid,:in_contract_type,:out_output_xml) FROM  DUAL;

 使用 选择调用两个过程的正确方法是什么? span>语句?

解决方案

您正在尝试违反RDBMS基础知识.无论任何RDBMS,都无法在选择"语句中调用存储过程.

请查看以下链接,以获取有关" Oracle/PL-SQL存储过程"的信息.它还将为您提供执行/调用存储过程的正确语法.

http://plsql-tutorial.com/plsql-procedures.htm

http://plsql-tutorial.com/plsql-passing-parameters-procedure-function.htm

相反,您可以使用"功能",您可以在选择"语句中调用它.
http://plsql-tutorial.com/plsql-functions.htm


<据我所知,我们无法在select语句中调用存储过程.

纠正我,如果我错了


同意deepakdynamite1 ..
您无法调用两个存储过程,但可以在一个存储过程中选择两个表.为此,请执行以下操作.


how to call two procedures in a select query eg:- SELECT sp_get_input_xml (:in_request_oid, :in_contract_oid, :in_contract_type, :out_input_xml ), sp_get_output_xml (:in_request_oid, :in_contract_oid, :in_contract_type, :out_output_xml ) FROM DUAL;

whats the correct way to call two procedures using select statement?

解决方案

You are trying to go against Fundamentals of RDBMS. You can''t call Stored Procedures in "Select" statement regardless of any RDBMS.

Have a look at below links for information on "Oracle/PL-SQL Stored Procedures". It will also provide you proper syntax of Executing/Calling Stored Procedure.

http://plsql-tutorial.com/plsql-procedures.htm

http://plsql-tutorial.com/plsql-passing-parameters-procedure-function.htm

Instead you may use "Functions" which you can call in your "Select" statements.
http://plsql-tutorial.com/plsql-functions.htm


As far as I know We Cannot call stores Procedure in select Statement.

Correct me if i am wrong


Agreed with deepakdynamite1..
You cant make call to two stored procedures but you can select two tables in one stored procedure..go for that..


这篇关于使用select语句调用两个过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆