I have a varchar(50) sql server column with data like this:
RawData ---------------------------- Washington 40 New Orleans 32 Detroit 27 St. Louis 23
You can use the PATINDEX function instead of CHARINDEX, here lies the documentation ;)