在另一个存储过程中执行存储过程 [英] Execute a stored procedure inside another stored procedure
本文介绍了在另一个存储过程中执行存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想应用insert语句应该起作用的一个条件。我需要控制从storedproc输出中插入临时表的内容。
I want to apply one condition on which the insert statement should work. I need to control what is getting inserted into temp tables from the storedproc output.
insert into #temptable
exec dbo.spGetInformation @input
推荐答案
您好b $ b
您可以使用MSDN:存储过程输出参数 [ ^ ]
如果您无法更改存储过程,则只能检查存储过程是否成功执行。
Hi
You can probably use MSDN : Stored Procedure Output Paramter[^]
If you are not able to change your stored procedure then you can only check for successful execution of stored procedure.
DECLARE @result int;
EXECUTE @result = my_proc;
@result值0表示您的存储过程已成功执行。
有关详细信息,请查看此链接 [ ^ ]
[/编辑]
祝你好运。
@result value 0 means that your stored procedure executed successfully.
For more information check this link[^]
[/Edit]
Best Luck.
Hello Bharath,
您还没有提供有关存储过程的详细信息,我建议您查看一下这篇文章[^ 。表值函数或临时表可能是您正在查看的选项。
问候,
Hello Bharath,
Sine you have not given the details about your stored procedure, I suggest you to have a look at this article [^]. The Table-valued Functions or Temp Tables might be the options you are looking at.
Regards,
这篇关于在另一个存储过程中执行存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文