21 lines
660 B
MySQL
21 lines
660 B
MySQL
|
-- ======================================
|
||
|
-- 机构维度表
|
||
|
-- ======================================
|
||
|
|
||
|
|
||
|
select
|
||
|
dept_code -- 城市单元编码
|
||
|
,dept_name -- 城市单元名称
|
||
|
,thrd_dept_code -- 办事处编码
|
||
|
,thrd_dept_name -- 办事处名称
|
||
|
,secd_dept_code -- 大区编码
|
||
|
,secd_dept_name -- 大区名称
|
||
|
,fist_dept_code -- 事业部编码
|
||
|
,fist_dept_name -- 事业部名称
|
||
|
from dwr.dim_department
|
||
|
where dept_level=4
|
||
|
and corp_code='0202'
|
||
|
and enabled_status=1
|
||
|
and fist_dept_code in ('0202/0212','0202/0225','0202/0226','0202/0209','0202/0252')
|
||
|
and thrd_dept_name !~'停用|废'
|
||
|
and secd_dept_name !~'停用|废'
|