SELECT
unique(a.last_name) 员工编号
,a.first_name 员工姓名
,f.last_name 上级编号
,f.first_name 上级姓名 ,a.email_address 邮件地址
,a.date_of_birth 出生日期
,a.start_date 入职日期
,a.national_identifier ×××
,b.name 部门名称
,c.name 职位名称
,d.location_code BASE地点
from
PER_ALL_ASSIGNMENTS_F g
,PER_ALL_PEOPLE_F a
,hr_organization_units b
,PER_JOBS c
,HR_LOCATIONS_ALL d
,PER_ALL_POSITIONS e
,PER_ALL_PEOPLE_F f
where
g.person_id=a.person_id (+)
and g.organization_id=b.organization_id(+)
and g.job_id=c.job_id(+)
and g.location_id=d.location_id(+)
and g.position_id=e.position_id(+)
and g.supervisor_id=f.person_id(+)
and g.effective_end_date > (select sysdate from dual)
and a.effective_end_date > (select sysdate from dual)
and g.primary_flag='Y'
and a.first_name is not null
unique(a.last_name) 员工编号
,a.first_name 员工姓名
,f.last_name 上级编号
,f.first_name 上级姓名 ,a.email_address 邮件地址
,a.date_of_birth 出生日期
,a.start_date 入职日期
,a.national_identifier ×××
,b.name 部门名称
,c.name 职位名称
,d.location_code BASE地点
from
PER_ALL_ASSIGNMENTS_F g
,PER_ALL_PEOPLE_F a
,hr_organization_units b
,PER_JOBS c
,HR_LOCATIONS_ALL d
,PER_ALL_POSITIONS e
,PER_ALL_PEOPLE_F f
where
g.person_id=a.person_id (+)
and g.organization_id=b.organization_id(+)
and g.job_id=c.job_id(+)
and g.location_id=d.location_id(+)
and g.position_id=e.position_id(+)
and g.supervisor_id=f.person_id(+)
and g.effective_end_date > (select sysdate from dual)
and a.effective_end_date > (select sysdate from dual)
and g.primary_flag='Y'
and a.first_name is not null
转载于:https://blog.51cto.com/bingyi/90626