Home

How to get last string value

declare @lastString varchar(50);
SELECT @lastString = Field FROM [Table] WHERE Field='2015,1289,613431220'

SELECT SUBSTRING(@lastString , LEN(@lastString) -  CHARINDEX(',',REVERSE(@lastString)) + 2  , LEN(@s)  )

0 comentários:

 
Powered by Blogger