DBA Data[Home] [Help]

APPS.HZ_IMP_MATCH_RULE_50 dependencies on HZ_IMP_DUP_PARTIES

Line 895: insert into hz_imp_dup_parties(party_id,dup_party_id, score, party_osr, party_os, batch_id, auto_merge_flag

891: BEGIN
892: FND_FILE.put_line(FND_FILE.log,'------------------------------------------------');
893: FND_FILE.put_line(FND_FILE.log,'WU: '||from_osr||' to '||to_osr);
894: FND_FILE.put_line(FND_FILE.log,'Start time of insert of Parties '||to_char(sysdate,'hh24:mi:ss'));
895: insert into hz_imp_dup_parties(party_id,dup_party_id, score, party_osr, party_os, batch_id, auto_merge_flag
896: ,created_by,creation_date,last_update_login,last_update_date,last_updated_by)
897: select f, t, sum(score) sc, party_osr, party_os, p_batch_id, 'N'
898: ,hz_utility_v2pub.created_by,hz_utility_v2pub.creation_date,hz_utility_v2pub.last_update_login
899: ,hz_utility_v2pub.last_update_date,hz_utility_v2pub.last_updated_by

Line 1011: from hz_imp_dup_parties h1, HZ_SRCH_CPTS s1, HZ_STAGED_CONTACT_POINTS s2

1007: 0
1008: )
1009: )
1010: score
1011: from hz_imp_dup_parties h1, HZ_SRCH_CPTS s1, HZ_STAGED_CONTACT_POINTS s2
1012: where h1.batch_id = p_batch_id and s1.party_osr between from_osr and to_osr
1013: and s1.batch_id = h1.batch_id and s1.party_osr = h1.party_osr and s1.party_os = h1.party_os and s2.party_id = h1.dup_party_id
1014: and (
1015: ------------ NON FILTER ATTRIBUTES SECTION ------------------------

Line 1027: HZ_DQM_DUP_ID_PKG.update_hz_imp_dup_parties(p_batch_id, x_ent_cur);

1023: (s1.TX8 is not null and s2.TX8 like s1.TX8 || decode(sign(lengthb(s1.TX8)-3),1,'%',''))
1024: )
1025: )
1026: ) group by f,t ;
1027: HZ_DQM_DUP_ID_PKG.update_hz_imp_dup_parties(p_batch_id, x_ent_cur);
1028: close x_ent_cur;
1029: FND_FILE.put_line(FND_FILE.log,'Number of parties updated '||SQL%ROWCOUNT);
1030: FND_FILE.put_line(FND_FILE.log,'End time to update '||to_char(sysdate,'hh24:mi:ss'));
1031: FND_FILE.put_line(FND_FILE.log,'Ending update of Parties on the basis of CONTACT_POINTS');

Line 1050: from hz_imp_dup_parties h1, HZ_SRCH_CONTACTS s1, HZ_STAGED_CONTACTS s2

1046: decode(instrb(s2.TX22,s1.TX22),1,10,
1047: 0
1048: )
1049: score
1050: from hz_imp_dup_parties h1, HZ_SRCH_CONTACTS s1, HZ_STAGED_CONTACTS s2
1051: where h1.batch_id = p_batch_id and s1.party_osr between from_osr and to_osr
1052: and s1.batch_id = h1.batch_id and s1.party_osr = h1.party_osr and s1.party_os = h1.party_os and s2.party_id = h1.dup_party_id
1053: and (
1054: ------------ NON FILTER ATTRIBUTES SECTION ------------------------

Line 1061: HZ_DQM_DUP_ID_PKG.update_hz_imp_dup_parties(p_batch_id, x_ent_cur);

1057: (s1.TX23 is not null and s2.TX23 like s1.TX23 || decode(sign(lengthb(s1.TX23)-3),1,'%',''))
1058: )
1059: )
1060: ) group by f,t ;
1061: HZ_DQM_DUP_ID_PKG.update_hz_imp_dup_parties(p_batch_id, x_ent_cur);
1062: close x_ent_cur;
1063: FND_FILE.put_line(FND_FILE.log,'Number of parties updated '||SQL%ROWCOUNT);
1064: FND_FILE.put_line(FND_FILE.log,'End time to update '||to_char(sysdate,'hh24:mi:ss'));
1065: FND_FILE.put_line(FND_FILE.log,'Ending update of Parties on the basis of CONTACTS');

Line 1073: delete from hz_imp_dup_parties a

1069: FND_FILE.put_line(FND_FILE.log,'------------------------------------------------');
1070: FND_FILE.put_line(FND_FILE.log,'DELETE ON THRESHOLD AND INDIRECT TRANSITIVITY ');
1071: FND_FILE.put_line(FND_FILE.log,'Begin time to delete '||to_char(sysdate,'hh24:mi:ss'));
1072:
1073: delete from hz_imp_dup_parties a
1074: where (a.party_osr >= from_osr and a.party_osr <= to_osr
1075: and a.batch_id = p_batch_id)
1076: and (
1077: a.score < p_threshold

Line 1081: (Select 1 from hz_imp_dup_parties b

1077: a.score < p_threshold
1078: or
1079: -- delete the party id whose duplicate is a bigger number, when scores are same
1080: exists
1081: (Select 1 from hz_imp_dup_parties b
1082: where b.batch_id=p_batch_id and a.party_id=b.party_id and a.dup_party_id > b.dup_party_id and a.score = b.score)
1083: or
1084: -- delete the party id with least score, if scores are different
1085: exists

Line 1086: (Select 1 from hz_imp_dup_parties b

1082: where b.batch_id=p_batch_id and a.party_id=b.party_id and a.dup_party_id > b.dup_party_id and a.score = b.score)
1083: or
1084: -- delete the party id with least score, if scores are different
1085: exists
1086: (Select 1 from hz_imp_dup_parties b
1087: where b.batch_id=p_batch_id and a.party_id=b.party_id and a.score < b.score)
1088: );
1089:
1090: FND_FILE.put_line(FND_FILE.log,'Number of records deleted from hz_imp_dup_parties '||SQL%ROWCOUNT);

Line 1090: FND_FILE.put_line(FND_FILE.log,'Number of records deleted from hz_imp_dup_parties '||SQL%ROWCOUNT);

1086: (Select 1 from hz_imp_dup_parties b
1087: where b.batch_id=p_batch_id and a.party_id=b.party_id and a.score < b.score)
1088: );
1089:
1090: FND_FILE.put_line(FND_FILE.log,'Number of records deleted from hz_imp_dup_parties '||SQL%ROWCOUNT);
1091: FND_FILE.put_line(FND_FILE.log,'End time to delete '||to_char(sysdate,'hh24:mi:ss'));
1092: --------UPDATE AUTO MERGE FLAG --------------
1093: update hz_imp_dup_parties a
1094: set a.auto_merge_flag = 'Y'

Line 1093: update hz_imp_dup_parties a

1089:
1090: FND_FILE.put_line(FND_FILE.log,'Number of records deleted from hz_imp_dup_parties '||SQL%ROWCOUNT);
1091: FND_FILE.put_line(FND_FILE.log,'End time to delete '||to_char(sysdate,'hh24:mi:ss'));
1092: --------UPDATE AUTO MERGE FLAG --------------
1093: update hz_imp_dup_parties a
1094: set a.auto_merge_flag = 'Y'
1095: where a.score >= p_auto_merge_threshold
1096: and a.party_osr >= from_osr and a.party_osr <= to_osr
1097: and a.batch_id = p_batch_id ;

Line 1102: from hz_imp_dup_parties a

1098: --------UPDATE DQM ACTION FLAG IN INTERFACE/STAGING TABLES --------------
1099:
1100: open x_ent_cur for
1101: select a.party_osr, a.party_os, a.auto_merge_flag
1102: from hz_imp_dup_parties a
1103: where a.batch_id = p_batch_id
1104: and a.party_osr between from_osr and to_osr ;
1105: HZ_DQM_DUP_ID_PKG.update_party_dqm_action_flag(p_batch_id, x_ent_cur);
1106: ----------------------PARTY LEVEL DUPLICATE IDENTIFICATION ENDS --------------------