select distinct cch.emp_person_id
from cmp_cwb_hrchy cch, cmp_cwb_person_info ccpi
where ccpi.WS_MGR_PERSON_EVENT_ID=cch.MGR_PERSON_EVENT_ID
and ccpi.PERSON_EVENT_ID=cch.EMP_PERSON_EVENT_ID
and ccpi.assignment_id=cch.emp_assignment_id
and ccpi.WS_MGR_ASSIGNMENT_ID=cch.MGR_ASSIGNMENT_ID
/现在我想加上解码或case语句。条件是:如果mgr\u id参数传递manager\u id和lvl\u num=1(对于直接下属),则应显示cch.emp\u person\u id,否则应传递所有员工,表示不考虑lvl\u num=1。/
暂无答案!
目前还没有任何答案,快来回答吧!