What is the expected result of the sample data?See if this is what you wantselect data, street, substring(data,len(street)+1,len(data)-len(street)-len([type])) as [name], case when [type] not like '%[^0-9]%' then right(substring(data,1,len(data)-len([type])-1),charindex(' ',reverse(substring(data,1,len(data)-len([type])-1)))-1) +[type] else [type] end as [type] from(select data, left(data,charindex(' ',data)-1) as street, right(data,charindex(' ',reverse(data))-1) as [type] from(select '410 MELINDA ST' as data union allselect '1102 S GREVILEA AVE APT'union allselect '4391 E 117TH ST APT 12') as t) as tMadhivananFailing to plan is Planning to fail