SQL Server 2008功能中的EXEC [英] EXEC in SQL SERVER 2008 function
本文介绍了SQL Server 2008功能中的EXEC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以在函数中使用EXEC吗?我得到一个错误=在函数中无效使用副作用运算符"EXECUTE STRING"."
我们可以使用另一种方法在Function中执行sql查询吗?
谢谢.
Hi,
Can we use EXEC in function.I an getting error="Invalid use of a side-effecting operator ''EXECUTE STRING'' within a function."
can we use another way to execute sql query in Function.
Thanks.
推荐答案
我不认为您可以在函数内部执行过程.
将函数和过程都转换为过程,或者将它们转换为函数
全部BEST
i dont think u can execute a procedure inside a function.
either convert both the function and procedure to procedures or convert them to functions
All The BEST
否.您需要使用存储过程.
No. You need to use a stored procedure.
在下面的链接中查找类似的Question-Answer线程.
函数中的动态SQL查询
Have a look at below link for simmilar Question-Answer thread.
Dynamic SQL Quesry in Function
这篇关于SQL Server 2008功能中的EXEC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文