Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Articles with tag User Defined Function (UDF) Rss

Search for any content tagged user defined function (udf)

   Items 1 to 20 of 24    Older >>
 

A Function Gotcha with the Use of an Asterisk

This article describes and demonstrates the problem of using asterisk to select all fields from a table within a table function. (from Apr 2008)   Read more...
By Stephen Lasham 2009/09/11 (first published: 2008/04/30) | Source: SQLServerCentral.com | Category: user defined function (udf)
Rating: |  Discuss |   Briefcase | 17,986 reads

SQL Server user defined function to convert MSDB integer value to time value

In a recent tip I outlined a process for converting a date, stored as an integer into a datetime data type. Date and time information for run history of SQL Server Agent jobs is stored within the msdb..sysjobshistory table as an integer data type, not as a datetime as one would expect. As promised, this tip picks up where we left off. On converting the integer-typed run_time into a format that is more user friendly for presentation purposes.  Read more...
By Additional Articles 2009/05/20 | Source: MSSQLTips.com | Category: msdb
Rating: (not yet rated)  Rate this |   Briefcase | 2,011 reads

SQL Server UDF to pad a string

Unlike other relational database management systems that shall remain nameless, SQL Server's underlying coding language, T/SQL, does not have a built-in function for padding string values. I recently took it upon myself to create my own and as you'll see I got a little carried away  Read more...
By Additional Articles 2009/05/15 | Source: MSSQLTips.com | Category: string manipulation
Rating: (not yet rated)  Rate this |   Briefcase | 2,480 reads

Comparing Hardcoded functions, In-Line TVF's, and Scalar Functions

While perusing some of the threads on SQLServerCentral.com one of the questions that hit me was regarding the use of scalar functions in queries. In this particular case, in the column list of a SELECT statement. Did it make sense to encapsulate a routine...  Read more...
By Lynn Pettis 2009/05/12 | Source: SQLServerCentral.com | Category: blogs
Rating: (not yet rated)  Rate this |   Briefcase | 1,417 reads

SQL Server UDF to convert integer date to datetime format

This short tip shows how you can convert an integer date, such as those stored in msdb to a real datetime value.  Read more...
By Additional Articles 2009/04/03 | Source: MSSQLTips.com | Category: date manipulation
Rating:  Rate this |   Briefcase | 2,973 reads

Using schema binding to improve SQL Server UDF performance

SCHEMA BINDING is commonly used with SQL Server objects like views and User Defined Functions (UDF). The main benefit of SCHEMA BINDING is to avoid any accidental drop or change of an object that is referenced by other objects. A User Defined Function (UDF) may or may not access any underlying database objects, but in this tip we show how using SCHEMA BINDING with a UDF can improve performance even if there are no underlying objects.  Read more...
By Additional Articles 2009/03/09 | Source: MSSQLTips.com | Category: schema
Rating:  Rate this |   Briefcase | 3,637 reads

A Function Gotcha with the Use of an Asterisk

This article describes and demonstrates the problem of using asterisk to select all fields from a table within a table function. (from Apr 2008)   Read more...
By Stephen Lasham 2009/09/11 (first published: 2008/04/30) | Source: SQLServerCentral.com | Category: user defined function (udf)
Rating: |  Discuss |   Briefcase | 17,986 reads

Performance Tuning: Concatenation Functions and Some Tuning Myths

Rumor has it that Concatenation functions have gotten the nasty reputation of being "performance hogs". Here's why that's not true.  Read more...
By Jeff Moden 2008/01/01 | Source: SQLServerCentral.com | Category: test data
Rating: |  Discuss |   Briefcase | 15,376 reads

Understand when to use user-defined functions in SQL Server

In the simplest terms, a user-defined function (UDF) in SQL Server is a programming construct that accepts parameters, does work that typically makes use of the accepted parameters, and returns a type of result. This article will cover two types of UDFs: table-valued and scalar-valued.  Read more...
By Additional Articles 2007/12/12 | Source: Builder.com | Category: user defined function (udf)
Rating:  Rate this |   Briefcase | 3,785 reads

Complex Computed Columns

Computed columns in SQL Server 2000 allow you to have a calculated value available easily in a query. However by using a function instead of a simple formula you can build some very interesting solutions. New author Tim Chapman brings us a look at this technique.   Read more...
Rating: |  Discuss |   Briefcase | 19,566 reads

Tokenizing a String Using PARSENAME

SQL Server string manipulation using T-SQL leaves lots to be desired. Many postings and complaints about T-SQL deal with strings, but there are ways to work with it. Author Eli Leiba brings us a way to split out portions of a string that contains tokens with a user defined function. Read on to see how this is accomplished and the code used to perform the splitting.   Read more...
By Eli Leiba 2004/12/27 | Source: SQLServerCentral.com | Category: user defined function (udf)
Rating: |  Discuss |   Briefcase | 9,889 reads

SQL 2000 User Defined Function Primer

Many programming languages have supported User Defined Functions for years, but they are new to SQL Server 2000. In this article we will look at some of the ways functions can be used within SQL Server 2000.   Read more...
By Neil Boyle 2004/10/22 (first published: 2001/05/02) | Source: SQLServerCentral.com | Category: user defined function (udf)
Rating: |  Discuss |   Briefcase | 20,650 reads

Exotic use of User Defined Function

User defined functions were added in SQL Server 7 and enhanced in SQL Server 2000, but they are still a relatively little used feature. Here's a look at a unique way that Leo Peysakhovich solved a problem using a UDF.   Read more...
Rating: |  Discuss |   Briefcase | 11,053 reads

Date Time Values and Time Zones

Dinesh looks at the date functions, how to work with time zones (or not), and does a brief comparison to see how you do similar tasks in Oracle.   Read more...
By Dinesh Asanka 2003/12/22 | Source: SQLServerCentral.com | Category: advanced querying
Rating: |  Discuss |   Briefcase | 14,674 reads

UDF as Computed Column Part 2

Dinesh is back with another article on user defined functions, giving some more great examples. If you haven't read the first one, definitely go back and read it first.   Read more...
Rating: |  Discuss |   Briefcase | 7,043 reads

UDF as Computed Column

UDF's are useful if somewhat tricky. Dinesh uses a common scenario where you have a self referencing table (the common example is an employees table where each employee has a managerid that links to another employee in the same table) to illustrate how a UDF can make querying easier, how to use it as the basis of a computed column, and how to index that column.   Read more...
Rating: |  Discuss |   Briefcase | 10,722 reads

Monitoring Performance

Vicktor has a bunch of scripts he uses to monitor performance, he explains why he built them and how to use them. Good coverage of the different reasons for slow performance.   Read more...
Rating: |  Discuss |   Briefcase | 16,172 reads

Review of SQL 2000 Fast Answers

A monster book at 980 pages, it's written in 'how-to' format and has a ton of good material. Andy gave it the once over for us and reports back - see what he thinks!   Read more...
By Andy Warren 2003/04/18 | Source: SQLServerCentral.com | Category: installation
Rating: |  Discuss |   Briefcase | 18,205 reads

Review of SQL Server 2000 Programming (MSPress)

Andy sits down with an entry level book to see if he should use it at work as a teaching aid. Did he like it? Should you buy it? Read the review now!   Read more...
By Andy Warren 2002/06/04 | Source: SQLServerCentral.com | Category: installation
Rating: (not yet rated) |  Discuss |   Briefcase | 6,398 reads

Some Useful UDFs for SQL Server 2000

Alxander Chigrik presents some useful User Defined Functions you can add to your SQL Server.   Read more...
Rating: |  Discuss |   Briefcase | 8,549 reads
   Items 1 to 20 of 24    Older >>