fn_getpy
select c.*,fn_getpy(c_name) || '@' ||
(case when newou like '%潮州%' then 'cz.gd.csg.cn' when
newou like '%东莞%' then 'dg.gd.csg.cn' when newou like '%佛山%' then 'fs.gd.csg.cn' when
newou like '%河源%' then 'hy.gd.csg.cn' when newou like '%惠州%' then 'hz.gd.csg.cn' when
newou like '%江门%' then 'jm.gd.csg.cn' when newou like '%揭阳%' then 'jy.gd.csg.cn' when
newou like '%清远%' then 'qy.gd.csg.cn' when newou like '%汕头%' then 'st.gd.csg.cn' when
newou like '%汕尾%' then 'sw.gd.csg.cn' when newou like '%韶关%' then 'sg.gd.csg.cn' when
newou like '%云浮%' then 'yf.gd.csg.cn' when newou like '%湛江%' then 'zj.gd.csg.cn' when
newou like '%肇庆%' then 'zq.gd.csg.cn' when newou like '%中山%' then 'zs.gd.csg.cn' when
newou like '%珠海%' then 'zh.gd.csg.cn' when newou like '%茂名%' then 'mm.gd.csg.cn' when
newou like '%梅州%' then 'mz.gd.csg.cn' when newou like '%阳江%' then 'yj.gd.csg.cn'
else 'gd.csg.cn' end)
as login_name from (
select * from (
select bb.*,aa.newou from 试点人资_人员_0408 bb
join isc_baseorg aa
on bb.c_org = aa.sysdataid) a
where a.newou like '%江门%' or a.newou like '%阳江%' or a.newou like '%惠州%'
) c
- 本文标签: 暂无相关标签
- 本文链接: https://www.jimmy2k.top/article/83
- 版权声明: 本文由JimmyZ的个人博客原创发布,转载请遵循《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权