In:
I said:
Here's some more information on managed code UDF's in SQL Server 2005:
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.GetTa x(@it int)
RETURNS decimal(38,10)
AS EXTERNAL
SELECT financial.GetTa x(id)
FROM hr.employees;
James A. Fortune
CDMAPoster@Fort uneJames.com
I said:
>Here's the reply:
>
>'-------
>You can find information on CREATE ASSEMBLY here.
>
>
>http://msdn2.microsoft.com/en-us/library/ms189524.aspx
>
>
>Mike
>'-------
>
>'-------
>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):
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.GetTa x(@it int)
RETURNS decimal(38,10)
AS EXTERNAL
SELECT financial.GetTa x(id)
FROM hr.employees;
James A. Fortune
CDMAPoster@Fort uneJames.com