asp.net codes
Thursday, January 7, 2016
Get the numeric from string in SQL
declare @st varchar(50) ='Mahesh999666777555'
select PatIndex('%[0-9]%',@st)
select substring(@st,PATINDEX('%[0-9]%', @st),len(@st)) GetNumber
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment