Trying to Split a String Into Parts by SQL Query

467 Views Asked by At

Please Excuse me if this is Simple... I am new to SQL..I am need to Run this Custom SQL Query to get data from Microsoft SQL Server. Here is this field

TitleName

abc_34235
abcd_2_56543
xyz_4532

I want to get a Column with Only these Values

34235
56543
4532

Please Help DR

1

There are 1 best solutions below

7
On BEST ANSWER

I think this can help you:

select RIGHT(TitleName,LEN(TitleName)-CHARINDEX('_',TitleName)) from Mytable