429: BEGIN
430:
431: -- we need to populate the batch summary table with all the counts
432: -- update party count
433: update hz_imp_batch_summary h
434: set dup_parties_in_batch =
435: (select count(1) from
436: (select distinct winner_record_osr
437: from hz_imp_int_dedup_results
447: where
448: h.batch_id = p_batch_id ;
449:
450: -- update party set count
451: update hz_imp_batch_summary h
452: set party_dup_sets_in_batch =
453: (select count(1) from
454: (select distinct winner_record_osr
455: from hz_imp_int_dedup_results
460: where
461: h.batch_id = p_batch_id ;
462:
463: -- update party site count
464: update hz_imp_batch_summary h
465: set dup_addresses_in_batch =
466: (select count(1) from
467: (select distinct winner_record_osr
468: from hz_imp_int_dedup_results
478: where
479: h.batch_id = p_batch_id ;
480:
481: -- update party site set count
482: update hz_imp_batch_summary h
483: set address_dup_sets_in_batch =
484: (select count(1) from
485: (select distinct winner_record_osr
486: from hz_imp_int_dedup_results
491: where
492: h.batch_id = p_batch_id ;
493:
494: -- update contacts count
495: update hz_imp_batch_summary h
496: set dup_contacts_in_batch =
497: (select count(1) from
498: (select distinct winner_record_osr
499: from hz_imp_int_dedup_results
509: where
510: h.batch_id = p_batch_id ;
511:
512: -- update contacts set count
513: update hz_imp_batch_summary h
514: set contact_dup_sets_in_batch =
515: (select count(1) from
516: (select distinct winner_record_osr
517: from hz_imp_int_dedup_results
523: h.batch_id = p_batch_id ;
524:
525:
526: -- update contact point count
527: update hz_imp_batch_summary h
528: set dup_contactpoints_in_batch =
529: (select count(1) from
530: (select distinct winner_record_osr
531: from hz_imp_int_dedup_results
541: where
542: h.batch_id = p_batch_id ;
543:
544: -- update contact point set count
545: update hz_imp_batch_summary h
546: set contactpoint_dup_sets_in_batch =
547: (select count(1) from
548: (select distinct winner_record_osr
549: from hz_imp_int_dedup_results
1190: BEGIN
1191:
1192: -- GET INTERFACE BATCH NAME
1193: select batch_name into p_batch_name
1194: from hz_imp_batch_summary
1195: where batch_id = p_batch_id;
1196:
1197: -- CALL THE HZ_DUP_BATCH TABLE HANDLER, INSERT A ROW
1198: -- FOR THIS INTERFACE BATCH AND ALSO GET THE BATCH ID
1307: -- Number of parties in interface for which a merge has been requested
1308: -- = (Total number of parties inserted into dup set parties - Number of winners)
1309: l_party_count := l_party_count - p_count ;
1310:
1311: -- update HZ_IMP_BATCH_SUMMARY with this count
1312: update hz_imp_batch_summary h
1313: set party_merge_requests = l_party_count
1314: where h.batch_id = p_batch_id ;
1315:
1308: -- = (Total number of parties inserted into dup set parties - Number of winners)
1309: l_party_count := l_party_count - p_count ;
1310:
1311: -- update HZ_IMP_BATCH_SUMMARY with this count
1312: update hz_imp_batch_summary h
1313: set party_merge_requests = l_party_count
1314: where h.batch_id = p_batch_id ;
1315:
1316: FND_FILE.put_line(FND_FILE.log,'Parties ::: Number of merge request parties inserted into batch summary table is '
1424: from hz_imp_dup_details a, hz_party_sites b
1425: where a.batch_id = p_batch_id
1426: and a.record_id = b.party_site_id
1427: and b.request_id = p_request_id ;
1428: update hz_imp_batch_summary h
1429: set address_merge_requests = ps_count
1430: where h.batch_id = p_batch_id ;
1431:
1432:
1435: from hz_imp_dup_details a, hz_contact_points b
1436: where a.batch_id = p_batch_id
1437: and a.record_id = b.contact_point_id
1438: and b.request_id = p_request_id ;
1439: update hz_imp_batch_summary h
1440: set contactpoint_merge_requests = cp_count
1441: where h.batch_id = p_batch_id ;
1442:
1443:
1448: where a.batch_id = p_batch_id
1449: and a.record_id = b.org_contact_id
1450: and b.request_id = p_request_id ;
1451:
1452: update hz_imp_batch_summary h
1453: set contact_merge_requests = c_count
1454: where h.batch_id = p_batch_id ;
1455:
1456: -- Total Count
1455:
1456: -- Total Count
1457: l_party_count := l_party_count + ps_count + c_count + cp_count ;
1458:
1459: update hz_imp_batch_summary h
1460: set total_merge_requests = l_party_count
1461: where h.batch_id = p_batch_id ;
1462:
1463: FND_FILE.put_line(FND_FILE.log,'Details ::: Total Number of merge requests inserted into batch summary table is '
1682: BEGIN
1683: -- Potential would mean party matches that do not pass the Automerge threshold
1684: -- Duplicates would mean party matches that do pass the Automerge threshold
1685:
1686: -- update dup party counts to hz_imp_batch_summary table
1687: update hz_imp_batch_summary h
1688: set dup_parties =
1689: (select count (distinct party_id)
1690: from hz_imp_dup_parties
1683: -- Potential would mean party matches that do not pass the Automerge threshold
1684: -- Duplicates would mean party matches that do pass the Automerge threshold
1685:
1686: -- update dup party counts to hz_imp_batch_summary table
1687: update hz_imp_batch_summary h
1688: set dup_parties =
1689: (select count (distinct party_id)
1690: from hz_imp_dup_parties
1691: where batch_id = p_batch_id
1694: where
1695: h.batch_id = p_batch_id ;
1696:
1697:
1698: -- update potential dup party counts to hz_imp_batch_summary table
1699: update hz_imp_batch_summary h
1700: set potential_dup_parties =
1701: (select count (distinct party_id)
1702: from hz_imp_dup_parties
1695: h.batch_id = p_batch_id ;
1696:
1697:
1698: -- update potential dup party counts to hz_imp_batch_summary table
1699: update hz_imp_batch_summary h
1700: set potential_dup_parties =
1701: (select count (distinct party_id)
1702: from hz_imp_dup_parties
1703: where batch_id = p_batch_id
1705: )
1706: where
1707: h.batch_id = p_batch_id ;
1708:
1709: -- update potential dup party site counts to hz_imp_batch_summary table
1710: update hz_imp_batch_summary h
1711: set potential_dup_addresses =
1712: (select count(1) from
1713: (select distinct record_id
1706: where
1707: h.batch_id = p_batch_id ;
1708:
1709: -- update potential dup party site counts to hz_imp_batch_summary table
1710: update hz_imp_batch_summary h
1711: set potential_dup_addresses =
1712: (select count(1) from
1713: (select distinct record_id
1714: from hz_imp_dup_details
1719: where
1720: h.batch_id = p_batch_id ;
1721:
1722:
1723: -- update potential dup contacts counts to hz_imp_batch_summary table
1724: update hz_imp_batch_summary h
1725: set potential_dup_contacts =
1726: (select count(1) from
1727: (select distinct record_id
1720: h.batch_id = p_batch_id ;
1721:
1722:
1723: -- update potential dup contacts counts to hz_imp_batch_summary table
1724: update hz_imp_batch_summary h
1725: set potential_dup_contacts =
1726: (select count(1) from
1727: (select distinct record_id
1728: from hz_imp_dup_details
1733: where
1734: h.batch_id = p_batch_id ;
1735:
1736:
1737: -- update potential contact point counts to hz_imp_batch_summary table
1738: update hz_imp_batch_summary h
1739: set potential_dup_contactpoints =
1740: (select count(1) from
1741: (select distinct record_id
1734: h.batch_id = p_batch_id ;
1735:
1736:
1737: -- update potential contact point counts to hz_imp_batch_summary table
1738: update hz_imp_batch_summary h
1739: set potential_dup_contactpoints =
1740: (select count(1) from
1741: (select distinct record_id
1742: from hz_imp_dup_details