SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: User Defined Functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 10/12/2000 :  00:28:17  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
This article covers all the basics of User Defined Functions. It discusses how (and why) to create them and when to use them. It talks about scalar, inline table-valued and multi-statement table-valued functions.

Article Link.

Robse
Starting Member

Germany
1 Posts

Posted - 09/02/2004 :  23:31:03  Show Profile  Reply with Quote
Nice Article! But I'm still having trouble with determining when to use a UDF...

I'm thinking that in your first example, 'USA' could return 'Unknown' ?
Seems logical ;)
Go to Top of Page

Texrat
Starting Member

1 Posts

Posted - 11/30/2005 :  13:28:11  Show Profile  Reply with Quote
I appreciate the info, but for me a HUGE piece is missing. The article says it discusses how to create UDFs, but I don't see the part where we're told how to get those nifty functions into SQL Server. As a new SS developer that's the part I need the most and can't find anywhere.
Go to Top of Page

jsmith8858
Dr. Cross Join

USA
7423 Posts

Posted - 11/30/2005 :  14:04:47  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
>>I don't see the part where we're told how to get those nifty functions into SQL Server

Did you see all the CREATE FUNCTION statements? That's how you create a function in SQL Server. If that's not what you mean, can you be more specific about what you need?
Go to Top of Page

aksam.iftikhar
Starting Member

1 Posts

Posted - 07/25/2009 :  12:28:27  Show Profile  Reply with Quote
quote:
Originally posted by jsmith8858

>>I don't see the part where we're told how to get those nifty functions into SQL Server

>>Did you see all the CREATE FUNCTION statements? That's how you create a function in SQL Server. If that's not what you mean, can you be more specific about what you need?



>> Well, you should use SQL Query Analyzer in SQL Server 2000 to type the CREATE FUNCTION command in. Once you complete the command you can execute it by pressing F5 and you're done.

Muhammad Aksam Iftikhar
Pakistan
Go to Top of Page

praveenbattula
Starting Member

India
4 Posts

Posted - 06/04/2010 :  14:41:47  Show Profile  Reply with Quote
Here is a small example, which helps to understand it better.
T-SQL Split the giving string by delimiter and return result in a table.http://praveenbattula.blogspot.com/2010/06/best-split-udf-function-with-delimeter.html

Rare Solutions
http://praveenbattula.blogspot.com
Go to Top of Page

blindman
Flowing Fount of Yak Knowledge

USA
2365 Posts

Posted - 06/04/2010 :  14:57:13  Show Profile  Reply with Quote
Hmmmmm....you might want to search the forum before you point people to a page entitle "Best" Split UDF function....

There are methods which do not require a loop or a temporary table. There is a whole thread devoted to the topic here.

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000