一、如何提取字符串中的纯数字
SQL语句如下(示例):
select a,substring(a,patindex('%[0-9]%', a),
patindex('%[0-9][^0-9]%', a)-patindex('%[0-9]%', a)+1)as only_number
from A
二、效果图
更多推荐
SQL Server 提取字符串中的纯数字
一、如何提取字符串中的纯数字
SQL语句如下(示例):
select a,substring(a,patindex('%[0-9]%', a),
patindex('%[0-9][^0-9]%', a)-patindex('%[0-9]%', a)+1)as only_number
from A
二、效果图
更多推荐
SQL Server 提取字符串中的纯数字
发布评论