DBA Data[Home] [Help]

APPS.HZ_MATCH_RULE_53 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 1775: FROM HZ_STAGED_PARTY_SITES stage, hz_relationships r, hz_org_contacts oc

1771: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )
1772: AND stage.party_id = p_party_id
1773: UNION
1774: SELECT /*+ INDEX(stage HZ_STAGED_PARTY_SITES_N2) */ stage.PARTY_SITE_ID, stage.PARTY_ID, stage.ORG_CONTACT_ID, TX3, TX4, TX9, TX10, TX11, TX14, TX15, TX22
1775: FROM HZ_STAGED_PARTY_SITES stage, hz_relationships r, hz_org_contacts oc
1776: WHERE contains( concat_col, p_contains_str)>0
1777: AND( (l_search_merged ='Y' )
1778: OR (l_search_merged = 'I' AND nvl(stage.status_flag, 'A') in ('A', 'I'))
1779: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )

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

1823: AND d.party_id = stage.party_id
1824: AND (p_dup_party_id IS NULL OR stage.party_id <> p_dup_party_id)
1825: UNION
1826: SELECT /*+ INDEX(stage HZ_STAGED_PARTY_SITES_N2) */ stage.PARTY_SITE_ID, r.subject_id, stage.ORG_CONTACT_ID, TX3, TX4, TX9, TX10, TX11, TX14, TX15, TX22
1827: FROM HZ_DQM_PARTIES_GT d, hz_relationships r,hz_org_contacts oc, HZ_STAGED_PARTY_SITES stage
1828: WHERE contains( concat_col, p_contains_str)>0
1829: AND( (l_search_merged ='Y' )
1830: OR (l_search_merged = 'I' AND nvl(stage.status_flag, 'A') in ('A', 'I'))
1831: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )

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

1897: ' AND( ('''||l_search_merged||''' =''Y'' ) '||
1898: ' OR ('''||l_search_merged||''' = ''I'' AND nvl(stage.status_flag, ''A'') in (''A'', ''I'')) '||
1899: ' OR ('''||l_search_merged||''' = ''N'' AND nvl(stage.status_flag, ''A'') = ''A'') ) '||
1900: ' AND ORG_CONTACT_ID IN ' ||
1901: ' ( SELECT org_contact_id from HZ_ORG_CONTACTS oc, (select object_id, relationship_id, subject_id party_id from hz_relationships ' ||
1902: ' where subject_type = ''PERSON'' AND object_type = ''ORGANIZATION'') stage1 ' ||
1903: ' where stage1.relationship_id = oc.party_relationship_id ' ||
1904: ' and ('||p_restrict_sql1|| ') )' ||
1905: ' AND (:p_dup IS NULL OR stage.party_id <> :p_dup) ';

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

2190: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )
2191: AND stage.party_id = p_party_id
2192: UNION
2193: 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
2194: FROM HZ_STAGED_CONTACT_POINTS stage, hz_relationships r, hz_org_contacts oc
2195: WHERE contains( concat_col, p_contains_str)>0
2196: AND r.object_id = p_party_id
2197: AND( (l_search_merged ='Y' )
2198: OR (l_search_merged = 'I' AND nvl(stage.status_flag, 'A') in ('A', 'I'))

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

2242: OR (l_search_merged = 'N' AND nvl(stage.status_flag, 'A') = 'A') )
2243: AND (p_dup_party_id IS NULL OR stage.party_id <> p_dup_party_id)
2244: UNION
2245: 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
2246: FROM HZ_DQM_PARTIES_GT d, HZ_RELATIONSHIPS r, HZ_ORG_CONTACTS oc, HZ_STAGED_CONTACT_POINTS stage
2247: WHERE contains( concat_col, p_contains_str)>0
2248: AND d.search_context_id = p_search_ctx_id
2249: AND d.party_id = r.subject_id
2250: AND r.relationship_id = oc.party_relationship_id

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

2316: ' AND( ('''||l_search_merged||''' =''Y'' ) '||
2317: ' OR ('''||l_search_merged||''' = ''I'' AND nvl(stage.status_flag, ''A'') in (''A'', ''I'')) '||
2318: ' OR ('''||l_search_merged||''' = ''N'' AND nvl(stage.status_flag, ''A'') = ''A'') ) '||
2319: ' AND (stage.org_contact_id in ' ||
2320: ' ( SELECT org_contact_id from HZ_ORG_CONTACTS oc, (select object_id, relationship_id, subject_id party_id from hz_relationships r ' ||
2321: ' where subject_type = ''PERSON'' AND object_type = ''ORGANIZATION'') stage1 ' ||
2322: ' where stage1.relationship_id = oc.party_relationship_id ' ||
2323: ' and ('||p_restrict_sql1 || ') ) )' ||
2324: ' AND (:p_dup IS NULL OR stage.party_id <> :p_dup) ';

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

3547: ELSIF p_contact_id IS NULL THEN
3548: RETURN NULL;
3549: ELSE
3550: BEGIN
3551: SELECT subject_id INTO l_person_id FROM HZ_RELATIONSHIPS r, HZ_ORG_CONTACTS oc, hz_parties p
3552: WHERE oc.org_contact_id = p_contact_id
3553: AND r.relationship_id = oc.party_relationship_id
3554: AND r.object_id = p_party_id
3555: AND p.party_id = r.subject_id

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

3696: WHERE contains( concat_col, p_contains_str)>0
3697: AND ORG_CONTACT_ID in (
3698: SELECT /*+ ORDERED INDEX(d hz_dqm_parties_gt_n1) USE_NL(d r)*/
3699: org_contact_id
3700: from hz_dqm_parties_gt d, hz_relationships r, hz_org_contacts oc
3701: where d.party_id = r.subject_id
3702: and oc.party_relationship_id = r.relationship_id
3703: and d.search_context_id = p_search_ctx_id);
3704: exception

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

4576: p_party_site_list HZ_PARTY_SEARCH.IDList;
4577: p_contact_ids HZ_PARTY_SEARCH.IDList;
4578: l_match_idx NUMBER;
4579: cursor get_cpt_for_contact_id is select contact_point_id
4580: from hz_org_contacts a, hz_relationships b, hz_contact_points c
4581: where a.party_relationship_id = b.relationship_id
4582: and c.owner_table_name = 'HZ_PARTIES'
4583: and c.primary_flag='Y'
4584: and c.owner_table_id = b.party_id

Line 5905: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS

5901: FROM HZ_PARTY_SITES
5902: WHERE (status is null OR status = 'A')
5903: AND party_id in (
5904: SELECT party_id
5905: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS
5906: WHERE HZ_RELATIONSHIPS.object_id = p_party_id
5907: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
5908: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
5909: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

Line 5909: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

5905: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS
5906: WHERE HZ_RELATIONSHIPS.object_id = p_party_id
5907: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
5908: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
5909: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id
5910: and l_use_contact_info = 'Y'
5911: )
5912: AND ROWNUM<6
5913: ) order by identifying_address_flag desc

Line 6111: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS, HZ_PERSON_PROFILES

6107: x_contact_list OUT NOCOPY HZ_PARTY_SEARCH.contact_list
6108: ) IS
6109: CURSOR c_contacts(cp_org_contact_id NUMBER) IS
6110: SELECT org_contact_id
6111: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS, HZ_PERSON_PROFILES
6112: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id
6113: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
6114: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
6115: AND HZ_RELATIONSHIPS.DIRECTIONAL_FLAG = 'F'

Line 6112: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id

6108: ) IS
6109: CURSOR c_contacts(cp_org_contact_id NUMBER) IS
6110: SELECT org_contact_id
6111: FROM HZ_ORG_CONTACTS, HZ_RELATIONSHIPS, HZ_PERSON_PROFILES
6112: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id
6113: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
6114: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
6115: AND HZ_RELATIONSHIPS.DIRECTIONAL_FLAG = 'F'
6116: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

Line 6116: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id

6112: WHERE HZ_ORG_CONTACTS.org_contact_id = cp_org_contact_id
6113: AND HZ_RELATIONSHIPS.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
6114: AND HZ_RELATIONSHIPS.OBJECT_TABLE_NAME = 'HZ_PARTIES'
6115: AND HZ_RELATIONSHIPS.DIRECTIONAL_FLAG = 'F'
6116: AND HZ_ORG_CONTACTS.party_relationship_id = HZ_RELATIONSHIPS.relationship_id
6117: AND HZ_RELATIONSHIPS.subject_id = HZ_PERSON_PROFILES.party_id
6118: AND HZ_PERSON_PROFILES.effective_end_date IS NULL;
6119:
6120: I NUMBER;