Novick Software
SQL Server Consulting Design Programming Tuning

  andy novick is a sql server mvp

 

 

User-Defined Functions (UDF) in SQL Server 2005

Updated with SQL Pass 2007 Version below

This presentation covers both types (T-SQL and SQLCLR) user- defined functions in SQL Server 2005.  Differences with SQL Server 2000 are pointed out as they are encountered

  • How to create and use the three types of UDFs:
        - Scalar
        - Inline
        - Multi-statement or Table-Valued
     
  • How to use 3 types of SQL CLR functions:
        - Scalar
        - Tabled Valued
        - User Defined Aggregate
     
  • Using CROSS APPLY and OUTER APPLY
  • Performance issues are a major part of the discussion.  They can be a problem with a UDF. 
  • Permissions to use UDFs are discussed
  • How to debug UDFs in SQL Server 2005 and 2000

This presentation is based on the one I gave when Transact-SQL User-Defined Functions was first published.  This one has been revised for SQL Server 2005.

You may download the User-Defined Functions in SQL Server 2005 slides and Download ZIP with sample database, T-SQL script, and SQLCLR example projects.

Note to use the SQLCLR projects, you should first attach the database making sure that it's not read-only.  Then when you open the SQLCLR projects, you will be prompted to change the database connection.  Make a new connection to the sample database.

More complete is this version with both the slides, database and more example files.  Be sure to read the readme.txt file regarding attaching.  UDF ZIP Pass 2007 Version.

    Access Day

Wednesday July 18
2007

6:30 to 8:30

 

SQL PASS Community Summit
Sept. 18-21 2007

Denver, CO

 


RSS as HTML

Personal Blog

 
New Tips:

Use dsinit to set the SQL Server instance for Windows Azure dev storage

Upcoming
Presentations:

SQL PASS
Nov 7, '12
Biggest
Loser: DB
Edition


Full Schedule