362: /* Bug 3223368. Replaced the old statement which was there in the cursor with
363: the below statement to improve performance.
365: Any time we will have one record in the per_all_people_f which
366: will be valid in the sysdate and this will be the record with
367: the maximum effective_start_date.
369: Now with this fix, we will avoid the sort which was most expensive.
372: SELECT prf.full_name
373: INTO x_person_name
374: FROM per_all_people_f prf
375: WHERE prf.person_id = x_person_id
376: AND trunc(sysdate) between prf.effective_start_date and prf.effective_end_date;