日期:2014-05-18 浏览次数:20575 次
declare @str varchar(50) Set @str='1076D67D70_0_10516-13' Select Substring(@str,1,9) Select cast(Substring(@str,10,1) as int)+1
------解决方案--------------------
declare @str varchar(30) set @str = '1076D67D70_0_10516-13' select stuff(@str,10,1,char(ascii(substring(@str,10,1))+1)) /*************** ------------------------------ 1076D67D71_0_10516-13 (1 行受影响)
------解决方案--------------------
SELECT SUBSTRING('1076D67D71_0_10516-13',1,9)+LTRIM((CAST(SUBSTRING('1076D67D71_0_10516-13',10,1) AS INT)+1))