!--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