Employee Info Query
Posted: Tue Dec 30, 2008 1:26 pm
hello,
Employee information report was requested like:
ENO,Grade,Job,salary,etc
I have managed to select most of the required data using the following query: (it's for one employee and gives me 2 records because of the change in salary)
select *
from per_all_people_f e
,per_all_assignments_f a
,HR_ALL_ORGANIZATION_UNITS o
,PAY_COST_ALLOCATION_KEYFLEX k
,per_jobs j
,PER_ALL_POSITIONS s
,HR_LOCATIONS_ALL_TL l
,per_grades g
,per_grade_definitions d
,PER_pay_proposals y
,pay_people_groups u
where
a.PERSON_ID(+)=e.PERSON_ID
and e.attribute30 = 5291
and a.ORGANIZATION_ID=o.ORGANIZATION_ID
and o.COST_ALLOCATION_KEYFLEX_ID=k.COST_ALLOCATION_KEYFLEX_ID(+)
and e.person_id in ('322','1018') -- 3 records
and e.BUSINESS_GROUP_ID = 229
and a.JOB_ID=j.JOB_ID(+)
and a.POSITION_ID=s.POSITION_ID(+)
and a.LOCATION_ID=l.LOCATION_ID
and a.GRADE_ID=g.GRADE_ID
and g.GRADE_DEFINITION_ID=d.GRADE_DEFINITION_ID
and a.ASSIGNMENT_ID=y.ASSIGNMENT_ID
and a.PAYROLL_ID=u.PEOPLE_GROUP_ID
My first question is:For any employee how can i choose the record with the most recent change in salary?
Another issue how can i join the element tables to the query above? I need to add 2 columns of elements such as car hire and children with the values assigned to employees within the employee record. How can I do that?
Help please...
Employee information report was requested like:
ENO,Grade,Job,salary,etc
I have managed to select most of the required data using the following query: (it's for one employee and gives me 2 records because of the change in salary)
select *
from per_all_people_f e
,per_all_assignments_f a
,HR_ALL_ORGANIZATION_UNITS o
,PAY_COST_ALLOCATION_KEYFLEX k
,per_jobs j
,PER_ALL_POSITIONS s
,HR_LOCATIONS_ALL_TL l
,per_grades g
,per_grade_definitions d
,PER_pay_proposals y
,pay_people_groups u
where
a.PERSON_ID(+)=e.PERSON_ID
and e.attribute30 = 5291
and a.ORGANIZATION_ID=o.ORGANIZATION_ID
and o.COST_ALLOCATION_KEYFLEX_ID=k.COST_ALLOCATION_KEYFLEX_ID(+)
and e.person_id in ('322','1018') -- 3 records
and e.BUSINESS_GROUP_ID = 229
and a.JOB_ID=j.JOB_ID(+)
and a.POSITION_ID=s.POSITION_ID(+)
and a.LOCATION_ID=l.LOCATION_ID
and a.GRADE_ID=g.GRADE_ID
and g.GRADE_DEFINITION_ID=d.GRADE_DEFINITION_ID
and a.ASSIGNMENT_ID=y.ASSIGNMENT_ID
and a.PAYROLL_ID=u.PEOPLE_GROUP_ID
My first question is:For any employee how can i choose the record with the most recent change in salary?
Another issue how can i join the element tables to the query above? I need to add 2 columns of elements such as car hire and children with the values assigned to employees within the employee record. How can I do that?
Help please...