select if(LOCATE('弄',房屋地址)>0,left(房屋地址,LOCATE('弄',房屋地址)),
left(房屋地址,LOCATE('村',房屋地址))) as 提取 from 16nian;
select 房屋地址,(case
when LOCATE('支弄',房屋地址)>0 then left(房屋地址,LOCATE('支弄',房屋地址)+1)
when LOCATE('弄',房屋地址)>0 then left(房屋地址,LOCATE('弄',房屋地址))
when LOCATE('村',房屋地址)>0 then left(房屋地址,LOCATE('村',房屋地址))
when LOCATE('号',房屋地址)>0 then left(房屋地址,LOCATE('号',房屋地址))
else 房屋地址 end)地址 from nian_16;
left(房屋地址,LOCATE('村',房屋地址))) as 提取 from 16nian;
select 房屋地址,(case
when LOCATE('支弄',房屋地址)>0 then left(房屋地址,LOCATE('支弄',房屋地址)+1)
when LOCATE('弄',房屋地址)>0 then left(房屋地址,LOCATE('弄',房屋地址))
when LOCATE('村',房屋地址)>0 then left(房屋地址,LOCATE('村',房屋地址))
when LOCATE('号',房屋地址)>0 then left(房屋地址,LOCATE('号',房屋地址))
else 房屋地址 end)地址 from nian_16;