Comments on SQL 2005 - Why You Can't EXEC() Inside a UDF
I was looking for an alternative to use execute string in a UDF. but I dint find the solution here.
but neway good stuff to know. The reasons why doesnt it support Execute strings in a UDF.
--Jaishree 00:22, 11 July 2007 (MST)
..."You might rightly ask, "but doesn't this make an otherwise easy task impossible?..."."
It seems so. I tried to use MSSQLServer having completed some complex projects using PostgreSQL. It seems, it would be better for me to return to Postgres. Powerful procedural language and minimum of limitations.
--kluck 02:32, 8 November 2007 (MST)
Every time I hear about a new and 'cool' feature of SQL server I find it's crippled in so many ways it provides very little benefit. UDFs fit this description precisely. Other examples are CTEs, and where dynamic sql can be used.
--ShipJumpa 14:41, 20 March 2008 (MST)
"This article aims to explain why the limitation exists and what you can do about it."
Where's the "what you can do about it" part?
--JC 07:15, 27 March 2009 (MST)
"Every time I hear about a new and 'cool' feature of SQL server I find it's crippled in so many ways it provides very little benefit. UDFs fit this description precisely. Other examples are CTEs, and where dynamic sql can be used."
QFT! After spending a few days trying to solve a few simple problems. SQL Server is a high priced toy. Normalize your database into another database that is simple enough for MS Query to handle, is the only solution.
--Jonk 05:58, 2 April 2009 (MST)
Thank you very much for the detailed information. I had spent many hours before finding this article.
--Deepak 15:46, 26 March 2010 (MST)
I wish I had a dollar for every article such as this: tempting you with a solution, and then giving you nothing you can use.
--Maxx 10:48, 18 May 2010 (MST)
Thanks for the article. This saved me from spending a lot of time on something that would have inevitably been a dead end.
--John Fuex 09:07, 16 June 2010 (MST)