http://groups.google.com/group/comp....3b99fed4b094ed
I said:
>Here's the reply:Here's some more information on managed code UDF's in SQL Server 2005:
'-------
You can find information on CREATE ASSEMBLY here.
http://msdn2.microsoft.com/en-us/library/ms189524.aspx
Mike
'-------
>From CLR Integration example, DAT418 (Christian Kleinerman):Public Function
GetTax(ByVal amount As Integer) As Integer
Return (amount * 0.68)
End Function
Compile code into an assembly.
SQL Server 2005:
CREATE ASSEMBLY FinancialLib
FROM 'c:\FinLib\bin\bl.dll'
WITH PERMISSION_SET = EXTERNAL_ACCESS
After that step, the assembly is copied into SQL Server.
CREATE FUNCTION financial.GetTax(@it int)
RETURNS decimal(38,10)
AS EXTERNAL
SELECT financial.GetTax(id)
FROM hr.employees;
James A. Fortune
CD********@FortuneJames.com