About Me

Dubai, United Arab Emirates
My name is Muhammad Faizan Karim and my aim is to spread the knowledge to everyone who want to learn oracle HRMS. I will try to write the video blogs for beginners so they can understand e-business suits from HRMS perspective, and if you have any difficulty in oracle applications HRMS , please feel free to contact with me at this email : faizan.kareem.ocp@gmail.com
Powered by Blogger.
Monday, November 10, 2014
Oracle HRMS Query to Get Previous Grade

SELECT
pg_old.name
from apps.per_all_people_f papf,
apps.per_all_assignments_f paaf_old,
apps.per_grades pg_old,
apps.per_all_assignments_f paaf_new,
apps.per_grades pg_new
where 1=1
and papf.person_id = paaf_old.person_id
and papf.person_id = paaf_new.person_id
and paaf_old.person_id = paaf_new.person_id
and paaf_old.assignment_type = 'E'
and paaf_old.primary_flag = 'Y'
and paaf_new.assignment_type = 'E'
and paaf_new.primary_flag = 'Y'
and pg_old.grade_id = paaf_old.grade_id
and pg_new.grade_id = paaf_new.grade_id
and paaf_old.grade_id <> paaf_new.grade_id
and trunc(paaf_old.effective_end_date)+1 =trunc(paaf_new.effective_start_date)
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and  trunc(paaf_new.effective_start_date) between paaf_new.effective_start_date and paaf_new.effective_end_date
--and papf.person_id = 162
and papf.person_id = paaf.person_id
and paaf_new.effective_start_date =(select
((to_char(max(paaf_new.effective_start_date),'DD-MON-RRRR')))
from apps.per_all_people_f papf,
apps.per_all_assignments_f paaf_old,
apps.per_grades pg_old,
apps.per_all_assignments_f paaf_new,
apps.per_grades pg_new
where 1=1
and papf.person_id = paaf_old.person_id
and papf.person_id = paaf_new.person_id
and paaf_old.person_id = paaf_new.person_id
and paaf_old.assignment_type = 'E'
and paaf_old.primary_flag = 'Y'
and paaf_new.assignment_type = 'E'
and paaf_new.primary_flag = 'Y'
and pg_old.grade_id = paaf_old.grade_id
and pg_new.grade_id = paaf_new.grade_id
and paaf_old.grade_id <> paaf_new.grade_id
and trunc(paaf_old.effective_end_date)+1 =trunc(paaf_new.effective_start_date)
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
and  trunc(paaf_new.effective_start_date) between paaf_new.effective_start_date and paaf_new.effective_end_date
--and papf.person_id = 162
and papf.person_id = paaf.person_id )


Oracle HRMS Query to Get Latest Basic Salary Change Date


SELECT ppps.proposed_salary_n from per_pay_proposals ppps
where paaf.assignment_id = ppps.assignment_id
AND ppps.last_change_date is not null
and ppps.change_date = (SELECT  TO_CHAR(max(ppp.change_date),'DD-MON-RRRR') as change_effective_date
from per_pay_proposals ppp
where 1=1
and paaf.assignment_id = ppp.assignment_id

AND last_change_date is not null )

0 comments: