select a.bed_no, substr(a.ward_code,1,instr(a.ward_code,'H',-1)-1) from bed_rec a;

相关文章: