151:
152: Cursor find_contacts is
153: select party_id
154: from hz_relationships rel,
155: hz_org_contacts org
156: where rel.relationship_id=org.party_relationship_id and
157: Subject_table_name = 'HZ_PARTIES' and
158: Object_table_name = 'HZ_PARTIES' and
159: Directional_flag = 'F' and
161:
162: Cursor org_update is
163: select party_id
164: from hz_relationships rel,
165: hz_org_contacts org
166: where rel.relationship_id=org.party_relationship_id and
167: Subject_table_name = 'HZ_PARTIES' and
168: Object_table_name = 'HZ_PARTIES' and
169: Directional_flag = 'F' and
389: -- anonymous block to find the orgContact
390: BEGIN
391: select party_id
392: into wf_party_id
393: from hz_org_contacts org, hz_relationships rel
394: where org.party_relationship_id=rel.relationship_id and
395: Subject_table_name = 'HZ_PARTIES' and
396: Object_table_name = 'HZ_PARTIES' and
397: Directional_flag = 'F' and
435: -- anonymous block to find the orgContact
436: BEGIN
437: select party_id
438: into wf_party_id
439: from hz_org_contacts org, hz_relationships rel
440: where org.party_relationship_id=rel.relationship_id and
441: Subject_table_name = 'HZ_PARTIES' and
442: Object_table_name = 'HZ_PARTIES' and
443: Directional_flag = 'F' and
980: END), SYSDATE) -- ExpirationDate --Bug#5209709 fix
981: ,pr.party_id -- system_id
982: FROM
983: hz_relationships pr
984: ,hz_org_contacts oc
985: ,hz_parties prp -- party relationship party
986: ,hz_parties per
987: ,hz_contact_points cp
988: ,hz_person_language pl