while charindex('qwer',@a)<>0
begin
select @a=SUBSTRING ( @a,charindex('qwer',@a)+5,LEN(@a)-charindex('qwer',@a)-4)
insert into #a values (@a)
end
select SUBSTRING (LTRIM ( string) ,1,charindex(' ',LTRIM ( string))) as result from #a
--查询结果
result
zxcv
yuchor
abcd