select
a.deptcode,
a.deptname,
decode(substr(a.deptcode,0,2),'jx',(select c.schoolname from sch_schoolinfo c where c.schoolcode = a.deptcode),'dw',(select d.deptname from sys_deptinfo d where d.deptcode = a.deptcode)) as name
from sys_userinfo a
a.deptcode,
a.deptname,
decode(substr(a.deptcode,0,2),'jx',(select c.schoolname from sch_schoolinfo c where c.schoolcode = a.deptcode),'dw',(select d.deptname from sys_deptinfo d where d.deptcode = a.deptcode)) as name
from sys_userinfo a