/* *除去字符串中的中文字符 */ CREATE FUNCTION [dbo].[fn_GSB_DropChinese] (@value varchar(1000)) returns varchar(1000) AS begin declare @returnchar varchar(100) declare @len int select @returnchar='',@len=1 while(@len<=LEN(@value)) begin if(ASCII(SUBSTRING(@value,@len,1))<122) set @returnchar=@returnchar+SUBSTRING(@value,@len,1) set @len=@len+1 end return @returnchar; end
/*
*除去字符串中的中文字符
*/
CREATE FUNCTION [dbo].[fn_GSB_DropChinese]
(@value varchar(1000))
returns varchar(1000)
AS
begin
declare @returnchar varchar(100)
declare @len int
select @returnchar=”,@len=1
while(@len<=LEN(@value))
begin
if(ASCII(SUBSTRING(@value,@len,1))<122)
set @returnchar=@returnchar+SUBSTRING(@value,@len,1)
set @len=@len+1
end
return @returnchar;
end
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/279635.html