Home Forums SQL Server 2005 T-SQL (SS2K5) Getting the Last Integer values RE: Getting the Last Integer values
Ken Simmons
SSCertifiable
Points: 7822
More actions
July 8, 2008 at 5:19 am
#839376
I think this will do whay you want.
Declare @STR varchar(20)
Set @STR = 'T3es5ta12p001'
select Substring(@str,len(@str)-PATINDEX('%[A-Z]%',reverse(@str))+2,len(@str))