??????SQL Server??????dll???????????
????1.???????dll???
????2.??dll??????SQL Server??????С?????????Function???????????Function??????dll?е??????
???????????dll???
????1.???“???”->“???”->“???”->??????????????StringHelp????????′???
namespace StringHelp??????????????????     //???????
{
public  class ClassConvert????????????//????
{
//?????????????е?Сд???????д???
public static string  ToUpper(string vInputString)????//????????????????????????????????????????????
{
return vInputString.ToUpper();
}
}
}
????2.???“???”?????”????“????????F6
????3.???“???”?????“???????????????д??????”?????bin->debug???????????StringHelp.dll?????
??????SQL??????dll???
????1.????dll???
???????SQL??? create assembly TestDll from 'C:Users??DocumentsVisual Studio 2012ProjectsStringHelpStringHelpobjDebugStringHelp.dll'
????????TestDll?????????????????????????????
?????????????dll????У?????????dll??????????????????dll??????????????????????dll?????????system.web dll??????????????????TestDll??
??????????????????system.web dll?????
????2.???????Function??????dll???
???????????SQL???
CREATE FUNCTION dbo.ToUpper????--?ú???????
(
@InputString as nvarchar(500)
)
RETURNS nvarchar(200)??????????--????????
AS EXTERNAL NAME TestDll.[StringHelp.ClassConvert].ToUpper
?????????±?????????????
????TestDll??????????dll???????
????StringHelp???dll??????????????????
????ClassConvert???dll???????????????
????ToUpper???dll?????????????????????
?????????????????????ú???
????print dbo.ToUpper('abc')
???????????ABC