I am working in SQL Server studio manager 2014
I found this and it is sort of close to what I am wanting, but not quite perfect.
Col2 = RIGHT([HospCode],LEN([HospCode])-CHARINDEX('.',[HospCode]))
My data looks like this
ABC.FRED.123
ABC.STEVE
ABC.SUSAN
ABC.TED.4456
ABC.WILL
ABC.TABITHA.11
ABC.TODD
I want to get rid of the "ABC." and the ".xxx" number section IF it exists and only see the Name section. So I want my final output to be something like:
FRED
STEVE
SUSAN
TED
WILL
TABITHA
TODD
Can anyone assist? Thank you in advance!