1 create function fn_ConvertPuntuation(@c3 nvarchar(3000)) 2 returns nvarchar(3000) 3 as 4 begin 5 select @c3=stuff(@c3,number,1,substring('~!@#$%^&*()_+;'':"",./<>?[]{}', 6 charindex(substring(@c3,number,1),'~!◎#¥%…※×()_+;‘:“”,。、《》?【】『』'),1)) 7 from master..spt_values 8 where type='p' and number between 1 and len(@c3) 9 and charindex(substring(@c3,number,1),'~!◎#¥%…※×()_+;‘:“”,。、《》?【】『』')>0 10 set @c3=replace(@c3,'^^','^') 11 return @c3 12 end
标签:中英文,number,substring,charindex,标点符号,sql,c3,nvarchar,3000 From: https://www.cnblogs.com/lgx5/p/17159931.html