?
SELECT PAPF.EMPLOYEE_NUMBER EMPLOYEE_NUMBER,
? ? ? ?PAPF.LAST_NAME LAST_NAME, --员工姓名
? ? ? ?PAPF.SEX GENDER, --性别
? ? ? ?PAPF.NATIONAL_IDENTIFIER NATIONAL_IDENTIFIER, --省份证号码
? ? ? ?HL.MEANING MARITAL_STATUS, --婚姻状况
? ? ? ?PAPF.EMAIL_ADDRESS EMAIL_ADDRESS, --email地址,
? ? ? ?FDFCT.DESCRIPTIVE_FLEX_CONTEXT_NAME || '.' || PA.ADDRESS_LINE1 || '.' ||
? ? ? ?PA.ADDRESS_LINE2 || '.' || HLA.MEANING || '.' || PA.POSTAL_CODE || '.' ||
? ? ? ?PA.TELEPHONE_NUMBER_1 || '.' || PA.TELEPHONE_NUMBER_2 EMPLOYEE_ADDRESS,
? ? ? ?PAPF.EFFECTIVE_START_DATE PER_EFFECTIVE_START_DATE, --人员日期自
? ? ? ?PAPF.EFFECTIVE_END_DATE PER_EFFECTIVE_END_DATE, --人员日期至
? ? ? ?HAOU.NAME ORGANIZATION_NAME, --组织名称
? ? ? ?PAAF.PRIMARY_FLAG PRIMARY_FLAG, --主分配标识
? ? ? ?PAAF.ASSIGNMENT_NUMBER ASSIGNMENT_NUMBER, --员工分配编号
? ? ? ?PJT.NAME JOB_NAME, --职务名称
? ? ? ?HAPFT.NAME POSITION_NAME, --职位名称
? ? ? ?PAAF.EFFECTIVE_START_DATE ASS_EFFECTIVE_START_DATE, --分配日期自
? ? ? ?PAAF.EFFECTIVE_END_DATE ASS_EFFECTIVE_END_DATE --分配日期至
? FROM PER_ALL_PEOPLE_F ? ? ? ? ? PAPF, --员工基本信息表
? ? ? ?PER_ALL_ASSIGNMENTS_F ? ? ?PAAF, --员工分配表
? ? ? ?PER_JOBS ? ? ? ? ? ? ? ? ? PJ, --员工职务
? ? ? ?PER_JOBS_TL ? ? ? ? ? ? ? ?PJT, --员工职务多语言表
? ? ? ?PER_ALL_POSITIONS ? ? ? ? ?PAP, --员工职位表
? ? ? ?HR_ALL_POSITIONS_F_TL ? ? ?HAPFT, --员工职位多语言表
? ? ? ?HR_LOOKUPS ? ? ? ? ? ? ? ? HL, --代码
? ? ? ?HR_ALL_ORGANIZATION_UNITS ?HAOU, --组织信息,
? ? ? ?FND_TERRITORIES_TL ? ? ? ? FTT, --地区
? ? ? ?FND_DESCR_FLEX_CONTEXTS_TL FDFCT, --弹性域内容
? ? ? ?HR_LOOKUPS ? ? ? ? ? ? ? ? HLA, --地址代码
? ? ? ?PER_ADDRESSES ? ? ? ? ? ? ?PA --地址信息
?WHERE PAPF.PERSON_ID = PAAF.PERSON_ID(+)
? ?AND PAAF.JOB_ID = PJ.JOB_ID(+)
? ?AND PJ.JOB_ID = PJT.JOB_ID(+)
? ?AND PJT.LANGUAGE(+) = USERENV('LANG')
? ?AND PAAF.POSITION_ID = PAP.POSITION_ID(+)
? ?AND PAP.POSITION_ID = HAPFT.POSITION_ID(+)
? ?AND HAPFT.LANGUAGE(+) = USERENV('LANG')
? ?AND PAAF.PRIMARY_FLAG = 'Y'
? ?AND PAPF.MARITAL_STATUS = HL.LOOKUP_CODE(+)
? ?AND HL.LOOKUP_TYPE(+) = 'MAR_STATUS'
? ?AND PAAF.ORGANIZATION_ID = HAOU.ORGANIZATION_ID(+)
? ?AND (SYSDATE BETWEEN PAPF.EFFECTIVE_START_DATE AND
? ? ? ?PAPF.EFFECTIVE_END_DATE)
? ?AND (SYSDATE BETWEEN PAAF.EFFECTIVE_START_DATE AND
? ? ? ?PAAF.EFFECTIVE_END_DATE)
? ?AND PAPF.PERSON_ID = PA.PERSON_ID(+)
? ?AND PA.COUNTRY = FTT.TERRITORY_CODE(+)
? ?AND PA.STYLE = FDFCT.DESCRIPTIVE_FLEX_CONTEXT_CODE(+)
? ?AND FDFCT.APPLICATION_ID(+) = 800
? ?AND FDFCT.DESCRIPTIVE_FLEXFIELD_NAME(+) = 'Address Structure'
? ?AND FDFCT.LANGUAGE(+) = USERENV('LANG')
? ?AND HLA.LOOKUP_TYPE(+) = 'ADDRESS_TYPE'
? ?AND PA.ADDRESS_TYPE = HLA.LOOKUP_CODE(+)
? ?AND FTT.LANGUAGE(+) = USERENV('LANG')