I'm often asked what a CLR function is and what purpose does a CLR function serve?

A CLR Function is a database object that accesses a compiled library of managed code as an external resource.

You can register the assembly in SQL Server and access functions from the library as a user defined function.

 You can learn more about CLR functions here http://msdn.microsoft.com/en-us/library/ms189876.aspx.