sql string转换成int型 sql截取字符串
select cast(SUBSTRING('ddd25844', PATINDEX('%[0-9]%', 'ddd25844'), 4 )as int)
string转换成int型
cast('字符串型数字' as int)
sql 截取字符串
substring('要截取的字符串','开始截取的索引',截取的个数)
获取字符串特定位置的索引
patindex('匹配的表达式','被取的字符串')
sql string转换成int型 sql截取字符串
select cast(SUBSTRING('ddd25844', PATINDEX('%[0-9]%', 'ddd25844'), 4 )as int)
string转换成int型
cast('字符串型数字' as int)
sql 截取字符串
substring('要截取的字符串','开始截取的索引',截取的个数)
获取字符串特定位置的索引
patindex('匹配的表达式','被取的字符串')