阅读背景:

SQL Server 提取数字、提取英文、提取中文的sql语句

来源:互联网 

!--NEWSZW_HZH_BEGIN--

--SQL 断定字段值是不是有中文
create function fun_getCN(@str nvarchar(4000))  
returns nvarchar(4000)  
 as  
 begin  
 declare @word nchar(1),@CN nvarchar(4000)  
 set @CN=""  
 while len(@str)>0  
 begin  
 set @word=left(@str,1)  
 if unicode(@word) between 19968 and 19968+20901 
   set @CN=@CN+@word
 set @str=right(@str,len(@str)-1)  
 end  
 return @CN  
 end  
select dbo.fun_getCN("ASDKG论坛KDL")
--论坛
select dbo.fun_getCN("ASDKG
--SQL 断定字段值是不是有中文
create f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: