126: where pa.noa_family_code = 'SEPARATION'
127: and pa.effective_date = p_pa_request_rec.effective_date - 1
128: and pa.person_id = p_pa_request_rec.person_id
129: and exists (select '1'
130: from ghr_pa_history pah
131: where pah.pa_request_id = pa.pa_request_id);
132:
133:
134:
138: where pa.noa_family_code = 'SEPARATION'
139: and pa.effective_date < p_pa_request_rec.effective_date
140: and pa.person_id = p_pa_request_rec.person_id
141: and exists (select '1'
142: from ghr_pa_history pah
143: where pah.pa_request_id = pa.pa_request_id)
144: order by pa.effective_date desc ;
145:
146: