如何为sql创建clr函数

时间:2021-10-13 01:44:26

I have a requirement to write a clr function to convert old data. I really do not have any knowledge about doing something like this. I really do not know where to start. Can someone help me and tell me the steps? Do I need to create a c function project...etc?

我需要编写一个clr函数来转换旧数据。我真的不知道做这样的事情。我真的不知道从哪里开始。有人可以帮助我并告诉我步骤吗?我需要创建一个c函数项目......等等吗?

2 个解决方案

#1


0  

You can do this in C#.

你可以用C#做​​到这一点。

Read the MSDN documentation for CLR functions on the Microsoft website.

阅读Microsoft网站上有关CLR功能的MSDN文档。

Create CLR Functions: http://msdn.microsoft.com/en-us/library/ms189876.aspx

创建CLR函数:http://msdn.microsoft.com/en-us/library/ms189876.aspx

How to: Create and Run a CLR SQL Server User-Defined Function http://msdn.microsoft.com/en-us/library/w2kae45k%28v=vs.80%29.aspx

如何:创建和运行CLR SQL Server用户定义函数http://msdn.microsoft.com/en-us/library/w2kae45k%28v=vs.80%29.aspx

These sites provide examples in C# with explanation.

这些站点提供了C#中的示例以及解释。

#2


1  

  1. You want a new SQLProject (from vs)
  2. 你想要一个新的SQLProject(来自vs)

  3. Add a stored procedure
  4. 添加存储过程

  5. Code your changes
  6. 编码您的更改

  7. deploy.

http://msdn.microsoft.com/en-us/library/5czye81z(v=VS.80).aspx

#1


0  

You can do this in C#.

你可以用C#做​​到这一点。

Read the MSDN documentation for CLR functions on the Microsoft website.

阅读Microsoft网站上有关CLR功能的MSDN文档。

Create CLR Functions: http://msdn.microsoft.com/en-us/library/ms189876.aspx

创建CLR函数:http://msdn.microsoft.com/en-us/library/ms189876.aspx

How to: Create and Run a CLR SQL Server User-Defined Function http://msdn.microsoft.com/en-us/library/w2kae45k%28v=vs.80%29.aspx

如何:创建和运行CLR SQL Server用户定义函数http://msdn.microsoft.com/en-us/library/w2kae45k%28v=vs.80%29.aspx

These sites provide examples in C# with explanation.

这些站点提供了C#中的示例以及解释。

#2


1  

  1. You want a new SQLProject (from vs)
  2. 你想要一个新的SQLProject(来自vs)

  3. Add a stored procedure
  4. 添加存储过程

  5. Code your changes
  6. 编码您的更改

  7. deploy.

http://msdn.microsoft.com/en-us/library/5czye81z(v=VS.80).aspx