declare @eim_basic_info table(ZS varchar(50))
insert into @eim_basic_info
select '上海市中山北一路1250号2号楼18层' union all
select '上海市水电路841号2楼201室' union all
select '上海市水电路393号2楼1001室'
--语句
select substring(ZS,charindex('路',ZS)+1,(charindex('号',ZS)-charindex('路',ZS)-1)) as number
from @eim_basic_info
--结果
number
--------------------------------------------------
1250
841
393
(3 行受影响)