create table #t(txt varchar(100))
insert into #t select 'xyz10oo'
insert into #t select 'a10yyz'
insert into #t select 'ab10i'
select left(txt,charindex('10',txt)-1)
from #tdrop table #t