DBA Data[Home] [Help]

APPS.HZ_MERGE_DUP_PVT dependencies on HZ_RELATIONSHIPS

Line 411: HZ_RELATIONSHIPS r

407: where code.class_category = 'RELATIONSHIP_TYPE_GROUP'
408: and code.class_code = 'PARTY_REL_GRP_CONTACTS'
409: and code.owner_table_name = 'HZ_RELATIONSHIP_TYPES'
410: and exists ( select 1 from hz_relationship_types rt,
411: HZ_RELATIONSHIPS r
412: where r.relationship_id = p_relationship_id
413: and r.relationship_type = rt.relationship_type
414: and r.relationship_code = rt.forward_rel_code
415: and r.subject_type = rt.subject_type

Line 496: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_CODE%TYPE; --4500011

492: l_org NUMBER;
493: l_object_version_number NUMBER;
494: db_object_version_number NUMBER;
495:
496: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_CODE%TYPE; --4500011
497: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_CODE%TYPE; --4500011
498: rel_batch_party_id NUMBER;
499: l_from_rel_party_id NUMBER;
500: l_to_rel_party_id NUMBER;

Line 497: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_CODE%TYPE; --4500011

493: l_object_version_number NUMBER;
494: db_object_version_number NUMBER;
495:
496: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_CODE%TYPE; --4500011
497: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_CODE%TYPE; --4500011
498: rel_batch_party_id NUMBER;
499: l_from_rel_party_id NUMBER;
500: l_to_rel_party_id NUMBER;
501: l_rel_party_count NUMBER;

Line 706: from hz_relationships pr1, hz_relationships pr2 --bug 4500011 replaced hz_party_relationships with hz_relationships

702: --check if the relationship types are same
703: select pr1.relationship_code from_rel_type,
704: pr2.relationship_code to_rel_type
705: into l_from_rel_type,l_to_rel_type
706: from hz_relationships pr1, hz_relationships pr2 --bug 4500011 replaced hz_party_relationships with hz_relationships
707: where pr1.relationship_id = p_from_entity_id
708: and pr2.relationship_id = p_to_entity_id
709: AND pr1.subject_table_name = 'HZ_PARTIES'
710: AND pr1.object_table_name = 'HZ_PARTIES'

Line 891: -- HZ_RELATIONSHIPS etc.

887: -- ARGUMENTS
888: -- IN:
889: -- p_batch_party_id Batch_Party_id from the merge tables
890: -- p_entity Name of the entity HZ_PARTY_SITES,
891: -- HZ_RELATIONSHIPS etc.
892: -- p_from_entity_id ID of the from record
893: -- p_to_entity_id ID of the to record
894:
895: -- OUT:

Line 927: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;

923: l_merge_type HZ_MERGE_PARTIES.MERGE_TYPE%TYPE;
924: l_status HZ_MERGE_BATCH.BATCH_STATUS%TYPE;
925: l_from_site_party_id NUMBER;
926: l_to_site_party_id NUMBER;
927: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
928: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
929: l_from_dflag HZ_RELATIONSHIPS.directional_flag%type;
930: l_to_dflag HZ_RELATIONSHIPS.directional_flag%type;
931:

Line 928: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;

924: l_status HZ_MERGE_BATCH.BATCH_STATUS%TYPE;
925: l_from_site_party_id NUMBER;
926: l_to_site_party_id NUMBER;
927: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
928: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
929: l_from_dflag HZ_RELATIONSHIPS.directional_flag%type;
930: l_to_dflag HZ_RELATIONSHIPS.directional_flag%type;
931:
932: l_map_dtl_count NUMBER;

Line 929: l_from_dflag HZ_RELATIONSHIPS.directional_flag%type;

925: l_from_site_party_id NUMBER;
926: l_to_site_party_id NUMBER;
927: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
928: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
929: l_from_dflag HZ_RELATIONSHIPS.directional_flag%type;
930: l_to_dflag HZ_RELATIONSHIPS.directional_flag%type;
931:
932: l_map_dtl_count NUMBER;
933: rel_batch_party_id NUMBER;

Line 930: l_to_dflag HZ_RELATIONSHIPS.directional_flag%type;

926: l_to_site_party_id NUMBER;
927: l_from_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
928: l_to_rel_type HZ_RELATIONSHIPS.RELATIONSHIP_TYPE%TYPE;
929: l_from_dflag HZ_RELATIONSHIPS.directional_flag%type;
930: l_to_dflag HZ_RELATIONSHIPS.directional_flag%type;
931:
932: l_map_dtl_count NUMBER;
933: rel_batch_party_id NUMBER;
934: l_from_rel_party_id NUMBER;

Line 1167: from hz_relationships r1, hz_relationships r2

1163: r2.relationship_type to_rel_type,
1164: r2.directional_flag to_dflag
1165: into l_from_rel_type, l_from_dflag,
1166: l_to_rel_type , l_to_dflag
1167: from hz_relationships r1, hz_relationships r2
1168: where r1.relationship_id = p_from_entity_id
1169: and r1.object_id = l_from_party_id
1170: and r2.relationship_id = p_to_entity_id
1171: and r2.object_id = l_to_party_id;

Line 1772: FROM HZ_RELATIONSHIPS r

1768:
1769: CURSOR c_from_reln(l_batch_id NUMBER,merge_type VARCHAR2) IS
1770: SELECT relationship_id, subject_id, object_id,
1771: relationship_code, actual_content_source, start_date, nvl(end_date,to_date('12/31/4712','MM/DD/YYYY'))
1772: FROM HZ_RELATIONSHIPS r
1773: WHERE (subject_id = p_from_party_id
1774: OR object_id = p_from_party_id)
1775: AND nvl(status, 'A') IN ('A','I')
1776: AND directional_flag = 'F'

Line 1794: FROM HZ_RELATIONSHIPS r

1790: c_batch_id NUMBER,cp_party_rel_code VARCHAR2, cp_obj_id NUMBER,
1791: cp_subj_id NUMBER, from_start_date date, from_end_date date,merge_type VARCHAR2)
1792: IS
1793: SELECT relationship_id, start_date, nvl(end_date,to_date('12/31/4712','MM/DD/YYYY'))
1794: FROM HZ_RELATIONSHIPS r
1795: WHERE subject_id = cp_subj_id
1796: AND object_id = cp_obj_id
1797: AND relationship_code = cp_party_rel_code
1798: --OR exists (select 1 from hz_relationship_types where relationship_type = cp_party_relationship_type

Line 1830: FROM HZ_RELATIONSHIPS r

1826: c_batch_id NUMBER, cp_party_rel_code VARCHAR2, cp_subj_id NUMBER,
1827: from_start_date date, from_end_date date)
1828: IS
1829: SELECT relationship_id, start_date, nvl(end_date,to_date('12/31/4712','MM/DD/YYYY'))
1830: FROM HZ_RELATIONSHIPS r
1831: WHERE
1832: relationship_id in (select distinct b.merge_to_entity_id
1833: from HZ_MERGE_PARTIES a, HZ_MERGE_PARTY_DETAILS b
1834: where a.batch_party_id = b.batch_party_id

Line 1852: FROM HZ_RELATIONSHIPS r

1848: c_batch_id NUMBER, cp_party_rel_code VARCHAR2, cp_obj_id NUMBER,
1849: from_start_date date, from_end_date date)
1850: IS
1851: SELECT relationship_id, start_date, nvl(end_date,to_date('12/31/4712','MM/DD/YYYY'))
1852: FROM HZ_RELATIONSHIPS r
1853: WHERE
1854: relationship_id in (select distinct b.merge_to_entity_id
1855: from HZ_MERGE_PARTIES a, HZ_MERGE_PARTY_DETAILS b
1856: where a.batch_party_id = b.batch_party_id

Line 1875: select 'Y' from hz_relationships where relationship_id=rel_id

1871:
1872:
1873: --bug 4867151 start
1874: CURSOR c_self_reln(rel_id NUMBER, batch_id NUMBER, to_id NUMBER) IS
1875: select 'Y' from hz_relationships where relationship_id=rel_id
1876: and (subject_id IN (SELECT dup_party_id FROM HZ_dup_set_PARTIES WHERE dup_set_id=batch_id))
1877: and (object_id IN (SELECT dup_party_id FROM HZ_dup_set_PARTIES WHERE dup_set_id=batch_id))
1878: AND directional_flag='F';
1879: --bug 4867151 end

Line 1885: FROM HZ_RELATIONSHIPS

1881: /* Commented out for BugNo:2940087 */
1882: /*CURSOR c_dup_ob_reln(cp_party_relationship_type VARCHAR2, cp_subj_id NUMBER)
1883: IS
1884: SELECT relationship_id
1885: FROM HZ_RELATIONSHIPS
1886: WHERE object_id = p_to_party_id
1887: AND subject_id = cp_subj_id
1888: AND relationship_code = cp_party_relationship_type
1889: AND nvl(status, 'A') = 'A'

Line 1897: l_dup_start_date HZ_RELATIONSHIPS.start_date%TYPE;

1893: AND actual_content_source <> 'DNB';
1894: */
1895: l_pr_id NUMBER;
1896: l_dup_pr_id NUMBER;
1897: l_dup_start_date HZ_RELATIONSHIPS.start_date%TYPE;
1898: l_dup_end_date HZ_RELATIONSHIPS.end_date%TYPE;
1899:
1900: l_subj_id NUMBER;
1901: l_obj_id NUMBER;

Line 1898: l_dup_end_date HZ_RELATIONSHIPS.end_date%TYPE;

1894: */
1895: l_pr_id NUMBER;
1896: l_dup_pr_id NUMBER;
1897: l_dup_start_date HZ_RELATIONSHIPS.start_date%TYPE;
1898: l_dup_end_date HZ_RELATIONSHIPS.end_date%TYPE;
1899:
1900: l_subj_id NUMBER;
1901: l_obj_id NUMBER;
1902: l_reltype HZ_RELATIONSHIPS.relationship_code%TYPE;

Line 1902: l_reltype HZ_RELATIONSHIPS.relationship_code%TYPE;

1898: l_dup_end_date HZ_RELATIONSHIPS.end_date%TYPE;
1899:
1900: l_subj_id NUMBER;
1901: l_obj_id NUMBER;
1902: l_reltype HZ_RELATIONSHIPS.relationship_code%TYPE;
1903: l_relcode HZ_RELATIONSHIPS.relationship_code%TYPE;
1904: l_contype HZ_RELATIONSHIPS.actual_content_source%TYPE;
1905: l_start_date HZ_RELATIONSHIPS.start_date%TYPE;
1906: l_end_date HZ_RELATIONSHIPS.end_date%TYPE;

Line 1903: l_relcode HZ_RELATIONSHIPS.relationship_code%TYPE;

1899:
1900: l_subj_id NUMBER;
1901: l_obj_id NUMBER;
1902: l_reltype HZ_RELATIONSHIPS.relationship_code%TYPE;
1903: l_relcode HZ_RELATIONSHIPS.relationship_code%TYPE;
1904: l_contype HZ_RELATIONSHIPS.actual_content_source%TYPE;
1905: l_start_date HZ_RELATIONSHIPS.start_date%TYPE;
1906: l_end_date HZ_RELATIONSHIPS.end_date%TYPE;
1907:

Line 1904: l_contype HZ_RELATIONSHIPS.actual_content_source%TYPE;

1900: l_subj_id NUMBER;
1901: l_obj_id NUMBER;
1902: l_reltype HZ_RELATIONSHIPS.relationship_code%TYPE;
1903: l_relcode HZ_RELATIONSHIPS.relationship_code%TYPE;
1904: l_contype HZ_RELATIONSHIPS.actual_content_source%TYPE;
1905: l_start_date HZ_RELATIONSHIPS.start_date%TYPE;
1906: l_end_date HZ_RELATIONSHIPS.end_date%TYPE;
1907:
1908: l_batch_id NUMBER;

Line 1905: l_start_date HZ_RELATIONSHIPS.start_date%TYPE;

1901: l_obj_id NUMBER;
1902: l_reltype HZ_RELATIONSHIPS.relationship_code%TYPE;
1903: l_relcode HZ_RELATIONSHIPS.relationship_code%TYPE;
1904: l_contype HZ_RELATIONSHIPS.actual_content_source%TYPE;
1905: l_start_date HZ_RELATIONSHIPS.start_date%TYPE;
1906: l_end_date HZ_RELATIONSHIPS.end_date%TYPE;
1907:
1908: l_batch_id NUMBER;
1909: l_batch_party_id NUMBER;

Line 1906: l_end_date HZ_RELATIONSHIPS.end_date%TYPE;

1902: l_reltype HZ_RELATIONSHIPS.relationship_code%TYPE;
1903: l_relcode HZ_RELATIONSHIPS.relationship_code%TYPE;
1904: l_contype HZ_RELATIONSHIPS.actual_content_source%TYPE;
1905: l_start_date HZ_RELATIONSHIPS.start_date%TYPE;
1906: l_end_date HZ_RELATIONSHIPS.end_date%TYPE;
1907:
1908: l_batch_id NUMBER;
1909: l_batch_party_id NUMBER;
1910: l_mandatory_merge VARCHAR2(1);

Line 1926: from hz_relationships

1922: l_to_id number;
1923: l_to_rel_status VARCHAR2(1); --6703948
1924: cursor c_get_rel_status(cp_id number) is
1925: select status
1926: from hz_relationships
1927: where relationship_id = cp_id
1928: and rownum = 1;
1929:
1930: cursor c_check_inactive_to_id(cp_id number) is

Line 2760: , HZ_RELATIONSHIPS rel

2756: cursor not_mandatory_reln_mp is
2757: select rel.relationship_id, rel.relationship_type, rel.relationship_code, rel.object_id, rel.subject_id, rel.subject_type, rel.object_type
2758: from HZ_MERGE_PARTYDTLS_SUGG mpd
2759: , HZ_MERGE_PARTIES_SUGG mp
2760: , HZ_RELATIONSHIPS rel
2761: where mpd.batch_party_id = mp.batch_party_id
2762: and mp.batch_id = p_batch_id
2763: and mpd.entity_name = 'HZ_PARTY_RELATIONSHIPS'
2764: and mpd.merge_from_entity_id = mpd.merge_to_entity_id

Line 2776: from HZ_RELATIONSHIPS rel

2772:
2773: -- this is for cleanse single party, pass in subject master which is the party to be cleansed
2774: cursor not_mandatory_reln_sp(l_master_party_id NUMBER) is
2775: select rel.relationship_id, rel.relationship_type, rel.relationship_code, rel.object_id, rel.subject_type, rel.object_type
2776: from HZ_RELATIONSHIPS rel
2777: where subject_id = l_master_party_id
2778: and not exists
2779: ( select 1
2780: from HZ_MERGE_PARTIES_SUGG mp

Line 2782: , HZ_RELATIONSHIPS rel2

2778: and not exists
2779: ( select 1
2780: from HZ_MERGE_PARTIES_SUGG mp
2781: , HZ_MERGE_PARTYDTLS_SUGG mpd
2782: , HZ_RELATIONSHIPS rel2
2783: where mp.batch_id = p_batch_id
2784: and mp.batch_party_id = mpd.batch_party_id
2785: and mpd.entity_name = 'HZ_PARTY_RELATIONSHIPS'
2786: and mpd.merge_from_entity_id = rel2.relationship_id

Line 2808: from HZ_MATCHED_PARTIES_GT mpgt, HZ_RELATIONSHIPS rel

2804: cursor get_suggested_reln(l_search_ctx_id NUMBER, l_reln_obj_id NUMBER, l_master_party NUMBER
2805: , l_reln_type VARCHAR2, l_reln_code VARCHAR2, l_reln_sbj_type VARCHAR2
2806: , l_reln_obj_type VARCHAR2) is
2807: select relationship_id
2808: from HZ_MATCHED_PARTIES_GT mpgt, HZ_RELATIONSHIPS rel
2809: where mpgt.search_context_id = l_search_ctx_id
2810: and mpgt.party_id <> l_reln_obj_id
2811: and mpgt.party_id = rel.object_id
2812: and rel.subject_id = l_master_party

Line 2837: from hz_orig_systems_b o,hz_relationships r

2833:
2834: --4114254
2835: CURSOR c_get_orig_system_r(rel_id NUMBER) IS
2836: select o.orig_system
2837: from hz_orig_systems_b o,hz_relationships r
2838: where r.relationship_id = rel_id
2839: and o.orig_system = r.actual_content_source
2840: and o.orig_system_type = 'PURCHASED'
2841: and directional_flag = 'F';

Line 2846: from hz_relationships

2842: --4114254
2843:
2844: cursor c_get_rel_status(cp_id number) is
2845: select status
2846: from hz_relationships
2847: where relationship_id = cp_id
2848: and rownum = 1;
2849:
2850: TYPE merge_from_reln_tbl IS TABLE OF NUMBER;

Line 2902: ' FROM HZ_RELATIONSHIPS rel' ||

2898: p_init_msg_list => FND_API.G_TRUE
2899: ,p_rule_id => p_rule_id
2900: ,p_party_id => l_reln_obj_id
2901: ,p_restrict_sql => 'stage.PARTY_ID IN (SELECT /*+ SELECTIVE */ OBJECT_ID' ||
2902: ' FROM HZ_RELATIONSHIPS rel' ||
2903: ' WHERE rel.SUBJECT_TYPE = '''||l_reln_sbj_type||''''||
2904: ' AND rel.OBJECT_TYPE = '''||l_reln_obj_type||''''||
2905: ' AND rel.RELATIONSHIP_TYPE = '''||l_reln_type||''''||
2906: ' AND rel.SUBJECT_ID IN (select dup_party_id' ||

Line 2925: from hz_orig_systems_b o,hz_relationships r

2921: -- if found any matches
2922: IF (l_num_matches > 0) THEN
2923:
2924: select o.orig_system,o.orig_system_type into l_to_orig_system,l_to_orig_system_type
2925: from hz_orig_systems_b o,hz_relationships r
2926: where r.relationship_id = l_reln_id
2927: and o.orig_system = r.actual_content_source
2928: and directional_flag = 'F';
2929:

Line 2939: from hz_relationships

2935: if l_num_matches = 1 and l_rel_status = 'I'
2936: then
2937: begin
2938: select relationship_id into l_reln_id --get active rel id
2939: from hz_relationships
2940: where object_id = l_reln_obj_id
2941: and status = 'A'
2942: and rownum = 1;
2943: exception WHEN NO_DATA_FOUND THEN null;

Line 2965: , HZ_RELATIONSHIPS rel

2961: ( SELECT rel.relationship_id
2962: FROM HZ_MATCHED_PARTIES_GT matchpty
2963: , HZ_MERGE_PARTYDTLS_SUGG mpd
2964: , HZ_MERGE_PARTIES_SUGG mps
2965: , HZ_RELATIONSHIPS rel
2966: , HZ_ORIG_SYSTEMS_B O
2967: WHERE matchpty.search_context_id = l_search_ctx_id
2968: AND matchpty.party_id = rel.object_id
2969: AND rel.relationship_code = l_reln_code

Line 3041: ' FROM HZ_RELATIONSHIPS rel' ||

3037: p_init_msg_list => FND_API.G_TRUE
3038: ,p_rule_id => p_rule_id
3039: ,p_party_id => l_reln_obj_id
3040: ,p_restrict_sql => 'stage.PARTY_ID IN (SELECT /*+ SELECTIVE */ OBJECT_ID' ||
3041: ' FROM HZ_RELATIONSHIPS rel' ||
3042: ' WHERE rel.SUBJECT_ID = '|| l_master_party||
3043: ' AND rel.SUBJECT_TYPE = '''||l_reln_sbj_type||''''||
3044: ' AND rel.OBJECT_TYPE = '''||l_reln_obj_type||''''||
3045: ' AND rel.relationship_type = '''||l_reln_type||''''||

Line 3372: -- p_entity_name HZ_PARTY_SITES - Addresses or HZ_RELATIONSHIPS - Relationships

3368: --
3369: -- ARGUMENTS
3370: -- IN:
3371: -- p_batch_id ID of the merge batch
3372: -- p_entity_name HZ_PARTY_SITES - Addresses or HZ_RELATIONSHIPS - Relationships
3373: -- p_merge_type Merge type of the dup set
3374: --
3375: -- OUT:
3376: -- x_return_status Return status after the call. The status can

Line 3444: -- if entity is HZ_RELATIONSHIPS, insert DUPLICATE_RELN_PARTY record to

3440: ( SELECT batch_party_id
3441: FROM HZ_MERGE_PARTIES_SUGG
3442: WHERE batch_id = p_batch_id );
3443:
3444: -- if entity is HZ_RELATIONSHIPS, insert DUPLICATE_RELN_PARTY record to
3445: -- HZ_MERGE_PARTIES table as well
3446:
3447: IF(p_entity_name = 'HZ_PARTY_RELATIONSHIPS') THEN
3448:

Line 3529: -- p_entity_name HZ_PARTY_SITES - Addresses or HZ_RELATIONSHIPS - Relationships

3525: --
3526: -- ARGUMENTS
3527: -- IN:
3528: -- p_batch_id ID of the merge batch
3529: -- p_entity_name HZ_PARTY_SITES - Addresses or HZ_RELATIONSHIPS - Relationships
3530: -- p_merge_type Merge type of the dup set
3531: --
3532: -- OUT:
3533: -- x_return_status Return status after the call. The status can

Line 3778: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel

3774:
3775: CURSOR get_reln_party_sp IS
3776: select to_rel.subject_id, count(1)
3777: from HZ_MERGE_PARTY_DETAILS mpd, HZ_MERGE_PARTIES mp
3778: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel
3779: , HZ_PARTIES from_pty, HZ_PARTIES to_pty
3780: where mpd.batch_party_id = mp.batch_party_id
3781: and mp.batch_id = p_batch_id
3782: and mpd.entity_name = 'HZ_PARTY_RELATIONSHIPS'

Line 3798: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel

3794:
3795: CURSOR get_reln_party_mp IS
3796: select to_rel.subject_id, count(1)
3797: from HZ_MERGE_PARTY_DETAILS mpd, HZ_MERGE_PARTIES mp
3798: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel
3799: , HZ_PARTIES from_pty, HZ_PARTIES to_pty
3800: where mpd.batch_party_id = mp.batch_party_id
3801: and mpd.merge_from_entity_id <> mpd.merge_to_entity_id
3802: and mp.batch_id = p_batch_id

Line 3823: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel

3819:
3820: CURSOR get_reln_from_party_sp(l_to_party_id NUMBER) IS
3821: select from_rel.subject_id
3822: from HZ_MERGE_PARTY_DETAILS mpd, HZ_MERGE_PARTIES mp
3823: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel
3824: , HZ_PARTIES from_pty, HZ_PARTIES to_pty
3825: where mpd.batch_party_id = mp.batch_party_id
3826: and mp.batch_id = p_batch_id
3827: and mpd.entity_name = 'HZ_PARTY_RELATIONSHIPS'

Line 3843: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel

3839:
3840: CURSOR get_reln_from_party_mp(l_to_party_id NUMBER) IS
3841: select from_rel.subject_id
3842: from HZ_MERGE_PARTY_DETAILS mpd, HZ_MERGE_PARTIES mp
3843: , HZ_RELATIONSHIPS from_rel, HZ_RELATIONSHIPS to_rel
3844: , HZ_PARTIES from_pty, HZ_PARTIES to_pty
3845: where mpd.batch_party_id = mp.batch_party_id
3846: and mpd.merge_from_entity_id <> mpd.merge_to_entity_id
3847: and mp.batch_id = p_batch_id

Line 4250: -- HZ_RELATIONSHIPS etc.

4246: -- ARGUMENTS
4247: -- IN:
4248: -- p_merge_batch_id ID of the merge batch
4249: -- p_entity Name of the entity HZ_PARTY_SITES,
4250: -- HZ_RELATIONSHIPS etc.
4251: -- p_entity_id ID of the entity
4252: -- p_merge_type Merge type of the dup set
4253: --
4254: -- OUT: