44: where party_id is not null
45: and person_id is null
46: union
47: select party_id,parent_id person_id
48: from per_phones
49: where party_id is not null
50: and parent_id is null
51: union
52: select party_id,person_id
468: --
469: -- update the phone records directly for performance
470: --
471:
472: update per_phones
473: set parent_id=l_person_ids(i)
474: ,parent_table='PER_ALL_PEOPLE_F'
475: where party_id=l_party_ids(i)
476: and parent_id is null;