January 28, 2002 at 6:11 am
Hello All..
I need to execute Dynamic SQL in a user defined function after passing the table name as a parameter and the return value has to a table. When I try to do this I get the error message
"Only functions and extended stored procedures can be executed from within a function."
Please Help
Kiran
January 28, 2002 at 7:16 am
Here's the allowed list:
In order to execute Dynamic SQL queries, you're either doing:
EXEC(<Dynamic SQL String>)
or
EXEC sp_executesql <Dynamic SQL String>
Which would violate the above list. You can use EXEC, but for extended stored procedures (xp_*).
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
February 12, 2002 at 3:07 pm
You could make a stored procedure that creates a table. Then you can pass more things to it.
Bill
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy