create function getstr(@s nvarchar(4000)) returns nvarchar(500)
as
begin
declare @i int
while patindex('%[^0-9,^a-z,^a-z,^阿-座,^' char(32) ']%',@s)>0
begin
set @i=patindex('%[^0-9,^a-z,^a-z,^阿-座,^' char(32) ']%',@s)
set @s=stuff(@s,@i,1,' ')
end
set @s=replace(@s,'^','')
set @s=replace(@s,' ','')
return @s
end
posted on 2013-11-01 15:06
sanmao 阅读(2331)
评论(0) 编辑 收藏