dcsimg

Ordered Common Language Runtime Table-Valued User-Defined Functions

January 27, 2009

[From SQL Server Magazine]

SQL Server 2008 enhances support for CLR table-valued user-defined functions by letting you define the order in which the rows are returned from the function. When you use the CREATE FUNCTION statement to register the CLR function in the database, you use an ORDER clause to specify the order. As an example, the CLR function fn_split whose definition is provided in Listing 1 always returns the rows ordered by the pos column. You can indicate this option when you register the function in the database. The following code registers two versions of the function, one without the ORDER clause and one with it:

The article continues at http://www.sqlmag.com/Articles/Index.cfm?ArticleID=100976&DisplayTab=Article








The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers