132: cursor c_chk_per(p_person_id number,
133: p_national_identifier varchar2,
134: p_name varchar2) is
135: select null
136: from per_all_people_f per,
137: per_business_groups bg
138: where per.person_id = p_person_id
139: and per.national_identifier = p_national_identifier
140: and per.business_group_id = bg.business_group_id
144: select distinct
145: per1.person_id,
146: per1.national_identifier ssn,
147: -1
148: from per_all_people_f per1,
149: per_contact_relationships pcr
150: where pcr.person_id = p_person_id
151: and per1.person_id = pcr.contact_person_id
152: and per1.effective_start_date =
150: where pcr.person_id = p_person_id
151: and per1.person_id = pcr.contact_person_id
152: and per1.effective_start_date =
153: (select min(per2.effective_start_date)
154: from per_all_people_f per2
155: where per2.person_id = per1.person_id);
156:
157: begin
158: hr_utility.set_location('Entering '||l_proc,5);