using System;using System.Data;using System.Data.SqlClient;using System.Data.SqlTypes;using Microsoft.SqlServer.Server;public partial class UserDefinedFunctions{[Microsoft.SqlServer.Server.SqlFunction]public static SqlString SplitString(string input, string pattenChars,int pos=0){string strReturn = string.Empty;if (string.IsNullOrEmpty(input) || string.IsNullOrEmpty(pattenChars)){strReturn = string.Empty;}else{string[] st = input.Split(pattenChars.ToCharArray());if(pos < st.Length){strReturn = st[pos];}}return new SqlString (strReturn);}[Microsoft.SqlServer.Server.SqlFunction]public static SqlInt32 Eval(string input){int rt =0;if (string.IsNullOrEmpty(input)){rt = 0;}else{rt = (int)(new DataTable().Compute(input,""));}return new SqlInt32(rt);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。