该参数具有两个值:直接报告和间接报告。
我尝试过:
select distinct cch.emp_person_id,
cch.lvl_num Empl_Lvl,
cch_lv.lvl_num MGR_LVL
from cmp_cwb_hrchy cch, cmp_cwb_hrchy cch_lv
where cch.mgr_person_id = :Mgr_id and
cch_lv.emp_person_id = :Mgr_id and
cch.MGR_PERSON_EVENT_ID= cch_lv.MGR_PERSON_EVENT_ID and
cch.EMP_PERSON_EVENT_ID = cch_lv.EMP_PERSON_EVENT_ID and
cch.lvl_num = cch_lv.lvl_num and
( 1=1 and cch.lvl_num = case when :direct_ALL = 'Direct' then cch_lv.lvl_num+1 else NULL end) and
( 1=1 and cch.lvl_num > case when :direct_ALL = 'ALL' then cch_.lvl_num else NULL end)