Clear documentation in regards to User-defined functions restrictions
-
Thursday, April 21, 2011 9:20 PM
I've been searching online for a clear list of restrictions in User-defined functions and the best I found so far is
http://technet.microsoft.com/en-us/library/ms191320.aspx
I found good blog by Pinal Dave, but I'm looking for official MS documentation.
Thanks in advance.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog- Moved by KJian_ Saturday, April 30, 2011 1:53 AM (From:Transact-SQL)
All Replies
-
Saturday, April 23, 2011 1:28 PM
Hi,
I find the following link provides specific guidelines, rules and restrictions.Please see:
User-Defined Function Design Guidelines
http://msdn.microsoft.com/en-us/library/ms187440.aspxThanks,
Ai-hua Qiu
Ai-hua Qiu[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
Sunday, April 24, 2011 3:00 AM
Hi Ai-hua,
Unless for me this link returns different info, I don't see a clear list of things which are not allowed in a function. I believe I checked that link above before.
I need something very similar to Pinal's blog
http://blog.sqlauthority.com/2007/05/29/sql-server-user-defined-functions-udf-limitations/
For every expert, there is an equal and opposite expert. - Becker's Law
My blog- Marked As Answer by Kalman TothMicrosoft Community Contributor Friday, April 29, 2011 4:43 AM
- Unmarked As Answer by Naomi NMicrosoft Community Contributor Friday, April 29, 2011 4:48 AM
-
Friday, April 29, 2011 4:45 AM
Most important thing to remember:
You cannot change the database in any shape or form within a UDF.
READ-ONLY access to the databases within a function.
Kalman Toth SQL SERVER 2012 & BI TRAINING
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012- Edited by Kalman TothMicrosoft Community Contributor Friday, April 29, 2011 4:55 AM
- Edited by Kalman TothMicrosoft Community Contributor Wednesday, September 26, 2012 5:43 PM
-
Friday, April 29, 2011 4:50 AMYes, that I know. I just thought there should be an explicit list of things that are not allowed in a function. Say, Pinal's blog mentions that UDF can not return XML. Recently there was a thread on this topic and that's why I started to look for clear documentation. So far I found none in BOL.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog -
Monday, May 09, 2011 7:03 AMModerator
Hello Naomi,
What about this link ?
You are true : it is really difficult to find complete information about the restrictions about user-defined functions in MS documentation
Have a nice day
PS : i discovered this link ( a little old one ) :
http://decipherinfosys.wordpress.com/2008/07/16/udf-limitations-in-sql-server/
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.- Edited by Papy NormandModerator Monday, May 09, 2011 7:09 AM added PS
-
Monday, May 09, 2011 11:58 AMThanks, Papy. The second link is good, but I don't think it lists everything. And also, it's not BOL documentation.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog

