DBA Data[Home] [Help]

APPS.HZ_IMP_MATCH_RULE_52 dependencies on HZ_IMP_DUP_PARTIES

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

901: BEGIN
902: FND_FILE.put_line(FND_FILE.log,'------------------------------------------------');
903: FND_FILE.put_line(FND_FILE.log,'WU: '||from_osr||' to '||to_osr);
904: FND_FILE.put_line(FND_FILE.log,'Start time of insert of Parties '||to_char(sysdate,'hh24:mi:ss'));
905: insert into hz_imp_dup_parties(party_id,dup_party_id, score, party_osr, party_os, batch_id, auto_merge_flag
906: ,created_by,creation_date,last_update_login,last_update_date,last_updated_by)
907: select f, t, sum(score) sc, party_osr, party_os, p_batch_id, 'N'
908: ,hz_utility_v2pub.created_by,hz_utility_v2pub.creation_date,hz_utility_v2pub.last_update_login
909: ,hz_utility_v2pub.last_update_date,hz_utility_v2pub.last_updated_by

Line 1029: from hz_imp_dup_parties h1, HZ_SRCH_PSITES s1, HZ_STAGED_PARTY_SITES s2

1025: decode(instrb(s2.TX22,s1.TX22),1,5,
1026: 0
1027: )
1028: score
1029: from hz_imp_dup_parties h1, HZ_SRCH_PSITES s1, HZ_STAGED_PARTY_SITES s2
1030: where h1.batch_id = p_batch_id and s1.party_osr between from_osr and to_osr
1031: 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
1032: and (
1033: ------------ NON FILTER ATTRIBUTES SECTION ------------------------

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

1042: (
1043: ((s1.TX11 is null and s2.TX11 is null) or s2.TX11 = s1.TX11 || ' ' )
1044: )
1045: ) group by f,t ;
1046: HZ_DQM_DUP_ID_PKG.update_hz_imp_dup_parties(p_batch_id, x_ent_cur);
1047: close x_ent_cur;
1048: FND_FILE.put_line(FND_FILE.log,'Number of parties updated '||SQL%ROWCOUNT);
1049: FND_FILE.put_line(FND_FILE.log,'End time to update '||to_char(sysdate,'hh24:mi:ss'));
1050: FND_FILE.put_line(FND_FILE.log,'Ending update of Parties on the basis of PARTY_SITES');

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

1065: decode(instrb(s2.TX22,s1.TX22),1,10,
1066: 0
1067: )
1068: score
1069: from hz_imp_dup_parties h1, HZ_SRCH_CONTACTS s1, HZ_STAGED_CONTACTS s2
1070: where h1.batch_id = p_batch_id and s1.party_osr between from_osr and to_osr
1071: 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
1072: and (
1073: ------------ NON FILTER ATTRIBUTES SECTION ------------------------

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

1076: (s1.TX23 is not null and s2.TX23 like s1.TX23 || decode(sign(lengthb(s1.TX23)-3),1,'%',''))
1077: )
1078: )
1079: ) group by f,t ;
1080: HZ_DQM_DUP_ID_PKG.update_hz_imp_dup_parties(p_batch_id, x_ent_cur);
1081: close x_ent_cur;
1082: FND_FILE.put_line(FND_FILE.log,'Number of parties updated '||SQL%ROWCOUNT);
1083: FND_FILE.put_line(FND_FILE.log,'End time to update '||to_char(sysdate,'hh24:mi:ss'));
1084: FND_FILE.put_line(FND_FILE.log,'Ending update of Parties on the basis of CONTACTS');

Line 1092: delete from hz_imp_dup_parties a

1088: FND_FILE.put_line(FND_FILE.log,'------------------------------------------------');
1089: FND_FILE.put_line(FND_FILE.log,'DELETE ON THRESHOLD AND INDIRECT TRANSITIVITY ');
1090: FND_FILE.put_line(FND_FILE.log,'Begin time to delete '||to_char(sysdate,'hh24:mi:ss'));
1091:
1092: delete from hz_imp_dup_parties a
1093: where (a.party_osr >= from_osr and a.party_osr <= to_osr
1094: and a.batch_id = p_batch_id)
1095: and (
1096: a.score < p_threshold

Line 1100: (Select 1 from hz_imp_dup_parties b

1096: a.score < p_threshold
1097: or
1098: -- delete the party id whose duplicate is a bigger number, when scores are same
1099: exists
1100: (Select 1 from hz_imp_dup_parties b
1101: 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)
1102: or
1103: -- delete the party id with least score, if scores are different
1104: exists

Line 1105: (Select 1 from hz_imp_dup_parties b

1101: 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)
1102: or
1103: -- delete the party id with least score, if scores are different
1104: exists
1105: (Select 1 from hz_imp_dup_parties b
1106: where b.batch_id=p_batch_id and a.party_id=b.party_id and a.score < b.score)
1107: );
1108:
1109: FND_FILE.put_line(FND_FILE.log,'Number of records deleted from hz_imp_dup_parties '||SQL%ROWCOUNT);

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

1105: (Select 1 from hz_imp_dup_parties b
1106: where b.batch_id=p_batch_id and a.party_id=b.party_id and a.score < b.score)
1107: );
1108:
1109: FND_FILE.put_line(FND_FILE.log,'Number of records deleted from hz_imp_dup_parties '||SQL%ROWCOUNT);
1110: FND_FILE.put_line(FND_FILE.log,'End time to delete '||to_char(sysdate,'hh24:mi:ss'));
1111: --------UPDATE AUTO MERGE FLAG --------------
1112: update hz_imp_dup_parties a
1113: set a.auto_merge_flag = 'Y'

Line 1112: update hz_imp_dup_parties a

1108:
1109: FND_FILE.put_line(FND_FILE.log,'Number of records deleted from hz_imp_dup_parties '||SQL%ROWCOUNT);
1110: FND_FILE.put_line(FND_FILE.log,'End time to delete '||to_char(sysdate,'hh24:mi:ss'));
1111: --------UPDATE AUTO MERGE FLAG --------------
1112: update hz_imp_dup_parties a
1113: set a.auto_merge_flag = 'Y'
1114: where a.score >= p_auto_merge_threshold
1115: and a.party_osr >= from_osr and a.party_osr <= to_osr
1116: and a.batch_id = p_batch_id ;

Line 1121: from hz_imp_dup_parties a

1117: --------UPDATE DQM ACTION FLAG IN INTERFACE/STAGING TABLES --------------
1118:
1119: open x_ent_cur for
1120: select a.party_osr, a.party_os, a.auto_merge_flag
1121: from hz_imp_dup_parties a
1122: where a.batch_id = p_batch_id
1123: and a.party_osr between from_osr and to_osr ;
1124: HZ_DQM_DUP_ID_PKG.update_party_dqm_action_flag(p_batch_id, x_ent_cur);
1125: ----------------------PARTY LEVEL DUPLICATE IDENTIFICATION ENDS --------------------