获取字符串中的字母

来源:互联网 发布:t局域网通讯软件 编辑:程序博客网 时间:2024/06/04 23:04
 
--=====================================--功能: 获取字符串中的字母 --来源:网络--日期: 2011-07-28龚德辉--=====================================ALTER function [dbo].[F_Get_Number](@S varchar(100)) returns int AS begin while PATINDEX('%[^0-9]%',@S)>0 begin set @S=stuff(@S,patindex('%[^0-9]%',@S),1,'') end return cast(@S as int) end 
原创粉丝点击