SELECT papf.employee_number,
papf.global_name staff_name,
papf.EMAIL_ADDRESS,
TO_CHAR (papf.date_of_birth, 'DD-MON-YYYY') date_of_birth,
TO_CHAR (papf.start_date, 'DD-MON-YYYY') HIRE_DATE,
hr_general.decode_lookup ('SEX', papF.SEX) GENER,
HR_PERSON_TYPE_USAGE_INFO.get_user_person_type (TO_DATE (SYSDATE),
PAPF.PERSON_ID)
Employee_type,
hr_general.decode_lookup ('MAR_STATUS', papF.marital_status)
MARITICAL_STATUS,
hr_general.decode_lookup ('NATIONALITY', papF.NATIONALITY)
NATIONALITY,
DEPT.name DEPARTMENT,
HR_GENERAL.DECODE_GRADE (PAAF.GRADE_ID) GRADE,
HR_GENERAL.DECODE_JOB (PAAF.JOB_ID) JOB,
HR_GENERAL.DECODE_POSITION_CURRENT_NAME (PAAF.POSITION_ID) POSITION,
HR_GENERAL.DECODE_PEOPLE_GROUP (PAAF.PEOPLE_GROUP_ID)
PEOPLE_GROUP,
HR_GENERAL.DECODE_LOCATION (PAAF.location_ID) location,
(SELECT PAPF1.EMPLOYEE_NUMBER
FROM per_all_people_f papf1
WHERE PAPF1.PERSON_ID = pap.APPRAISER_PERSON_ID
AND papf1.current_employee_flag = 'Y'
AND SYSDATE BETWEEN PAPF1.EFFECTIVE_START_DATE
AND PAPF1.EFFECTIVE_END_DATE)
Main_APPRAISER_NUMBER,
(SELECT PAPF1.GLOBAL_NAME
FROM per_all_people_f papf1
WHERE PAPF1.PERSON_ID = pap.APPRAISER_PERSON_ID
AND papf1.current_employee_flag = 'Y'
AND SYSDATE BETWEEN PAPF1.EFFECTIVE_START_DATE
AND PAPF1.EFFECTIVE_END_DATE)
Main_APPRAISER_NAME,
SUM (
TO_NUMBER (
HR_APPRAISALS_UTIL_SS.get_objective_score (POE.OBJECTIVE_ID,
POE.APPRAISAL_ID)))
OBJECTIVE_SCORE,
SUM (
TO_NUMBER (
HR_APPRAISALS_UTIL_SS.get_objective_score (
POE.OBJECTIVE_ID,
POE.APPRAISAL_ID)))
* 0.6
Objective_scroe_60per,
PAP.APPRAISAL_ID,
PAp.appraisee_person_id,
papF.person_id,
pap.APPRAISER_PERSON_ID,
pap.APPRAISAL_DATE,
pap.APPRAISAL_PERIOD_START_DATE,
pap.APPRAISAL_PERIOD_END_DATE,
pap.APPRAISAL_SYSTEM_STATUS,
pap.PLAN_ID
FROM PER_APPRAISALS PAP,
PER_OBJECTIVES POE,
per_all_people_f papf,
PER_ALL_ASSIGNMENTS_F PAAF,
hr_all_organization_units dept
WHERE --POE.OBJECTIVE_ID = PPR.OBJECTIVE_ID AND
PAP .APPRAISAL_ID = POE.APPRAISAL_ID
AND PAp.appraisee_person_id = papF.person_id
AND PAPF.PERSON_ID = PAAF.PERSON_ID
AND paaf.organization_id =DEPT.organization_id
--AND TO_CHAR (pap.appraisal_date, 'YYYY') = '2017'
--AND pap.APPRAISAL_ID = 35103
AND papf.current_employee_flag = 'Y'
AND PAAF.PRIMARY_FLAG = 'Y'
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.employee_number = '1352'
GROUP BY papf.employee_number,
papf.global_name,
PAP.APPRAISAL_ID,
PAp.appraisee_person_id,
papF.person_id,
APPRAISER_PERSON_ID,
pap.APPRAISAL_DATE,
pap.APPRAISAL_PERIOD_START_DATE,
pap.APPRAISAL_PERIOD_END_DATE,
pap.APPRAISAL_SYSTEM_STATUS,
pap.PLAN_ID,
papf.EMAIL_ADDRESS,
papf.date_of_birth,
papf.start_date,
papF.SEX,
PAPF.PERSON_ID,
papF.marital_status,
papF.NATIONALITY,
DEPT.name,
PAAF.GRADE_ID,
PAAF.JOB_ID,
PAAF.POSITION_ID,
PAAF.PEOPLE_GROUP_ID,
PAAF.location_ID,
pap.APPRAISER_PERSON_ID
ORDER BY 1;
papf.global_name staff_name,
papf.EMAIL_ADDRESS,
TO_CHAR (papf.date_of_birth, 'DD-MON-YYYY') date_of_birth,
TO_CHAR (papf.start_date, 'DD-MON-YYYY') HIRE_DATE,
hr_general.decode_lookup ('SEX', papF.SEX) GENER,
HR_PERSON_TYPE_USAGE_INFO.get_user_person_type (TO_DATE (SYSDATE),
PAPF.PERSON_ID)
Employee_type,
hr_general.decode_lookup ('MAR_STATUS', papF.marital_status)
MARITICAL_STATUS,
hr_general.decode_lookup ('NATIONALITY', papF.NATIONALITY)
NATIONALITY,
DEPT.name DEPARTMENT,
HR_GENERAL.DECODE_GRADE (PAAF.GRADE_ID) GRADE,
HR_GENERAL.DECODE_JOB (PAAF.JOB_ID) JOB,
HR_GENERAL.DECODE_POSITION_CURRENT_NAME (PAAF.POSITION_ID) POSITION,
HR_GENERAL.DECODE_PEOPLE_GROUP (PAAF.PEOPLE_GROUP_ID)
PEOPLE_GROUP,
HR_GENERAL.DECODE_LOCATION (PAAF.location_ID) location,
(SELECT PAPF1.EMPLOYEE_NUMBER
FROM per_all_people_f papf1
WHERE PAPF1.PERSON_ID = pap.APPRAISER_PERSON_ID
AND papf1.current_employee_flag = 'Y'
AND SYSDATE BETWEEN PAPF1.EFFECTIVE_START_DATE
AND PAPF1.EFFECTIVE_END_DATE)
Main_APPRAISER_NUMBER,
(SELECT PAPF1.GLOBAL_NAME
FROM per_all_people_f papf1
WHERE PAPF1.PERSON_ID = pap.APPRAISER_PERSON_ID
AND papf1.current_employee_flag = 'Y'
AND SYSDATE BETWEEN PAPF1.EFFECTIVE_START_DATE
AND PAPF1.EFFECTIVE_END_DATE)
Main_APPRAISER_NAME,
SUM (
TO_NUMBER (
HR_APPRAISALS_UTIL_SS.get_objective_score (POE.OBJECTIVE_ID,
POE.APPRAISAL_ID)))
OBJECTIVE_SCORE,
SUM (
TO_NUMBER (
HR_APPRAISALS_UTIL_SS.get_objective_score (
POE.OBJECTIVE_ID,
POE.APPRAISAL_ID)))
* 0.6
Objective_scroe_60per,
PAP.APPRAISAL_ID,
PAp.appraisee_person_id,
papF.person_id,
pap.APPRAISER_PERSON_ID,
pap.APPRAISAL_DATE,
pap.APPRAISAL_PERIOD_START_DATE,
pap.APPRAISAL_PERIOD_END_DATE,
pap.APPRAISAL_SYSTEM_STATUS,
pap.PLAN_ID
FROM PER_APPRAISALS PAP,
PER_OBJECTIVES POE,
per_all_people_f papf,
PER_ALL_ASSIGNMENTS_F PAAF,
hr_all_organization_units dept
WHERE --POE.OBJECTIVE_ID = PPR.OBJECTIVE_ID AND
PAP .APPRAISAL_ID = POE.APPRAISAL_ID
AND PAp.appraisee_person_id = papF.person_id
AND PAPF.PERSON_ID = PAAF.PERSON_ID
AND paaf.organization_id =DEPT.organization_id
--AND TO_CHAR (pap.appraisal_date, 'YYYY') = '2017'
--AND pap.APPRAISAL_ID = 35103
AND papf.current_employee_flag = 'Y'
AND PAAF.PRIMARY_FLAG = 'Y'
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.employee_number = '1352'
GROUP BY papf.employee_number,
papf.global_name,
PAP.APPRAISAL_ID,
PAp.appraisee_person_id,
papF.person_id,
APPRAISER_PERSON_ID,
pap.APPRAISAL_DATE,
pap.APPRAISAL_PERIOD_START_DATE,
pap.APPRAISAL_PERIOD_END_DATE,
pap.APPRAISAL_SYSTEM_STATUS,
pap.PLAN_ID,
papf.EMAIL_ADDRESS,
papf.date_of_birth,
papf.start_date,
papF.SEX,
PAPF.PERSON_ID,
papF.marital_status,
papF.NATIONALITY,
DEPT.name,
PAAF.GRADE_ID,
PAAF.JOB_ID,
PAAF.POSITION_ID,
PAAF.PEOPLE_GROUP_ID,
PAAF.location_ID,
pap.APPRAISER_PERSON_ID
ORDER BY 1;
No comments :
Post a Comment