Hello, I'm trying to query the "Compensation Zone" field. I'm using the query below but i'm not getting the right data for some employees and for some i don't find that field.
Any suggesetions please?
SELECT paaf.assignment_number,cz.* FROM
CMP_ADDRESS_ZONES cz,cmp_salary cs, per_all_assignments_f paaf
where 1=1
AND cz.geography_id = cs.geography_id
and cz.location_id = paaf.location_id
and trunc(sysdate) between cz.start_date and cz.end_date
and paaf.assignment_id = cs.assignment_id
AND trunc(sysdate) between cs.date_from and cs.date_to
AND trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date
and paaf.assignment_type = 'E'
and paaf.PRIMARY_FLAG='Y'
and paaf.assignment_sequence =
(select max(a.assignment_sequence)
from per_All_Assignments_m a
where paaf.person_id = a.person_id
and trunc(sysdate) between a.effective_start_date and a.effective_end_date
and a.ASSIGNMENT_TYPE in ('E')
and a.PRIMARY_FLAG='Y')
Thanks
Kumar