DBA Data[Home] [Help]

APPS.HZ_MATCH_RULE_35 dependencies on HZ_ORG_CONTACTS

Line 130: p_person_restrict_sql := 'exists ( SELECT 1 from HZ_ORG_CONTACTS oc, hz_relationships r'

126: ELSIF instrb(p_restrict_sql, 'stage.') > 0
127: THEN
128: p_restrict1_sql := replace( p_restrict_sql, 'stage.', 'stage1.');
129: END IF;
130: p_person_restrict_sql := 'exists ( SELECT 1 from HZ_ORG_CONTACTS oc, hz_relationships r'
131: || ' where oc.org_contact_id = stage.org_contact_id and'
132: || ' r.relationship_id = oc.party_relationship_id'
133: || ' and r.subject_type = ''PERSON'' AND r.object_type = ''ORGANIZATION'' '
134: || ' and exists ( SELECT 1 FROM HZ_PARTIES stage1 where stage1.party_id = r.subject_id'

Line 1643: FROM HZ_STAGED_PARTY_SITES stage, hz_relationships r, hz_org_contacts oc

1639: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )
1640: AND stage.party_id = p_party_id
1641: UNION
1642: SELECT /*+ INDEX(stage HZ_STAGED_PARTY_SITES_N2) */ stage.PARTY_SITE_ID, stage.PARTY_ID, stage.ORG_CONTACT_ID, TX3, TX4, TX9, TX10, TX14, TX22
1643: FROM HZ_STAGED_PARTY_SITES stage, hz_relationships r, hz_org_contacts oc
1644: WHERE contains( concat_col, p_contains_str)>0
1645: AND( (l_search_merged ='Y' )
1646: OR (l_search_merged = 'I' AND nvl(stage.status_flag, 'A') in ('A', 'I'))
1647: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )

Line 1695: FROM HZ_DQM_PARTIES_GT d, hz_relationships r,hz_org_contacts oc, HZ_STAGED_PARTY_SITES stage

1691: AND d.party_id = stage.party_id
1692: AND (p_dup_party_id IS NULL OR stage.party_id <> p_dup_party_id)
1693: UNION
1694: SELECT /*+ INDEX(stage HZ_STAGED_PARTY_SITES_N2) */ stage.PARTY_SITE_ID, r.subject_id, stage.ORG_CONTACT_ID, TX3, TX4, TX9, TX10, TX14, TX22
1695: FROM HZ_DQM_PARTIES_GT d, hz_relationships r,hz_org_contacts oc, HZ_STAGED_PARTY_SITES stage
1696: WHERE contains( concat_col, p_contains_str)>0
1697: AND( (l_search_merged ='Y' )
1698: OR (l_search_merged = 'I' AND nvl(stage.status_flag, 'A') in ('A', 'I'))
1699: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )

Line 1769: ' ( SELECT org_contact_id from HZ_ORG_CONTACTS oc, (select object_id, relationship_id, subject_id party_id from hz_relationships ' ||

1765: ' AND( ('''||l_search_merged||''' =''Y'' ) '||
1766: ' OR ('''||l_search_merged||''' = ''I'' AND nvl(stage.status_flag, ''A'') in (''A'', ''I'')) '||
1767: ' OR ('''||l_search_merged||''' = ''N'' AND nvl(stage.status_flag, ''A'') = ''A'') ) '||
1768: ' AND ORG_CONTACT_ID IN ' ||
1769: ' ( SELECT org_contact_id from HZ_ORG_CONTACTS oc, (select object_id, relationship_id, subject_id party_id from hz_relationships ' ||
1770: ' where subject_type = ''PERSON'' AND object_type = ''ORGANIZATION'') stage1 ' ||
1771: ' where stage1.relationship_id = oc.party_relationship_id ' ||
1772: ' and ('||p_restrict_sql1|| ') )' ||
1773: ' AND (:p_dup IS NULL OR stage.party_id <> :p_dup) ';

Line 2062: FROM HZ_STAGED_CONTACT_POINTS stage, hz_relationships r, hz_org_contacts oc

2058: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )
2059: AND stage.party_id = p_party_id
2060: UNION
2061: SELECT /*+ INDEX(stage HZ_STAGED_CONTACT_POINTS_N2) */ stage.CONTACT_POINT_ID, stage.contact_point_type, stage.PARTY_ID, stage.PARTY_SITE_ID, stage.ORG_CONTACT_ID
2062: FROM HZ_STAGED_CONTACT_POINTS stage, hz_relationships r, hz_org_contacts oc
2063: WHERE contains( concat_col, p_contains_str)>0
2064: AND r.object_id = p_party_id
2065: AND( (l_search_merged ='Y' )
2066: OR (l_search_merged = 'I' AND nvl(stage.status_flag, 'A') in ('A', 'I'))

Line 2114: FROM HZ_DQM_PARTIES_GT d, HZ_RELATIONSHIPS r, HZ_ORG_CONTACTS oc, HZ_STAGED_CONTACT_POINTS stage

2110: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )
2111: AND (p_dup_party_id IS NULL OR stage.party_id <> p_dup_party_id)
2112: UNION
2113: SELECT /*+ INDEX(stage HZ_STAGED_CONTACT_POINTS_N2) */ CONTACT_POINT_ID, stage.contact_point_type, r.subject_id, stage.PARTY_SITE_ID, stage.ORG_CONTACT_ID
2114: FROM HZ_DQM_PARTIES_GT d, HZ_RELATIONSHIPS r, HZ_ORG_CONTACTS oc, HZ_STAGED_CONTACT_POINTS stage
2115: WHERE contains( concat_col, p_contains_str)>0
2116: AND d.search_context_id = p_search_ctx_id
2117: AND d.party_id = r.subject_id
2118: AND r.relationship_id = oc.party_relationship_id

Line 2188: ' ( SELECT org_contact_id from HZ_ORG_CONTACTS oc, (select object_id, relationship_id, subject_id party_id from hz_relationships r ' ||

2184: ' AND( ('''||l_search_merged||''' =''Y'' ) '||
2185: ' OR ('''||l_search_merged||''' = ''I'' AND nvl(stage.status_flag, ''A'') in (''A'', ''I'')) '||
2186: ' OR ('''||l_search_merged||''' = ''N'' AND nvl(stage.status_flag, ''A'') = ''A'') ) '||
2187: ' AND (stage.org_contact_id in ' ||
2188: ' ( SELECT org_contact_id from HZ_ORG_CONTACTS oc, (select object_id, relationship_id, subject_id party_id from hz_relationships r ' ||
2189: ' where subject_type = ''PERSON'' AND object_type = ''ORGANIZATION'') stage1 ' ||
2190: ' where stage1.relationship_id = oc.party_relationship_id ' ||
2191: ' and ('||p_restrict_sql1 || ') ) )' ||
2192: ' AND (:p_dup IS NULL OR stage.party_id <> :p_dup) ';

Line 3413: SELECT subject_id INTO l_person_id FROM HZ_RELATIONSHIPS r, HZ_ORG_CONTACTS oc, hz_parties p

3409: ELSIF p_contact_id IS NULL THEN
3410: RETURN NULL;
3411: ELSE
3412: BEGIN
3413: SELECT subject_id INTO l_person_id FROM HZ_RELATIONSHIPS r, HZ_ORG_CONTACTS oc, hz_parties p
3414: WHERE oc.org_contact_id = p_contact_id
3415: AND r.relationship_id = oc.party_relationship_id
3416: AND r.object_id = p_party_id
3417: AND p.party_id = r.subject_id

Line 3562: from hz_dqm_parties_gt d, hz_relationships r, hz_org_contacts oc

3558: WHERE contains( concat_col, p_contains_str)>0
3559: AND ORG_CONTACT_ID in (
3560: SELECT /*+ ORDERED INDEX(d hz_dqm_parties_gt_n1) USE_NL(d r)*/
3561: org_contact_id
3562: from hz_dqm_parties_gt d, hz_relationships r, hz_org_contacts oc
3563: where d.party_id = r.subject_id
3564: and oc.party_relationship_id = r.relationship_id
3565: and d.search_context_id = p_search_ctx_id);
3566: exception

Line 4442: from hz_org_contacts a, hz_relationships b, hz_contact_points c

4438: p_party_site_list HZ_PARTY_SEARCH.IDList;
4439: p_contact_ids HZ_PARTY_SEARCH.IDList;
4440: l_match_idx NUMBER;
4441: cursor get_cpt_for_contact_id is select contact_point_id
4442: from hz_org_contacts a, hz_relationships b, hz_contact_points c
4443: where a.party_relationship_id = b.relationship_id
4444: and c.owner_table_name = 'HZ_PARTIES'
4445: and c.primary_flag='Y'
4446: and c.owner_table_id = b.party_id

Line 5743: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS

5739: FROM HZ_PARTY_SITES
5740: WHERE (status is null OR status = 'A')
5741: AND party_id in (
5742: SELECT party_id
5743: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS
5744: WHERE HZ_RELATIONSHIPS.object_id = p_party_id
5745: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
5746: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
5747: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

Line 5747: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

5743: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS
5744: WHERE HZ_RELATIONSHIPS.object_id = p_party_id
5745: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
5746: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
5747: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id
5748: and l_use_contact_info = 'Y'
5749: )
5750: AND ROWNUM<6
5751: ) order by identifying_address_flag desc

Line 5947: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS, HZ_PERSON_PROFILES

5943: x_contact_list OUT NOCOPY HZ_PARTY_SEARCH.contact_list
5944: ) IS
5945: CURSOR c_contacts(cp_org_contact_id NUMBER) IS
5946: SELECT org_contact_id
5947: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS, HZ_PERSON_PROFILES
5948: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id
5949: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
5950: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
5951: AND HZ_RELATIONSHIPS.DIRECTIONAL_FLAG = 'F'

Line 5948: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id

5944: ) IS
5945: CURSOR c_contacts(cp_org_contact_id NUMBER) IS
5946: SELECT org_contact_id
5947: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS, HZ_PERSON_PROFILES
5948: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id
5949: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
5950: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
5951: AND HZ_RELATIONSHIPS.DIRECTIONAL_FLAG = 'F'
5952: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

Line 5952: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

5948: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id
5949: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
5950: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
5951: AND HZ_RELATIONSHIPS.DIRECTIONAL_FLAG = 'F'
5952: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id
5953: AND HZ_RELATIONSHIPS.subject_id = HZ_PERSON_PROFILES.party_id
5954: AND HZ_PERSON_PROFILES.effective_end_date IS NULL;
5955:
5956: I NUMBER;