DBA Data[Home] [Help]

APPS.AMS_LISTDEDUPE_PVT dependencies on AMS_LIST_ENTRIES

Line 83: --executing dynamic sql statement to populate the merge_key field in ams_list_entries.

79: l_cursor_name INTEGER;
80: l_rows_processed INTEGER;
81: BEGIN
82:
83: --executing dynamic sql statement to populate the merge_key field in ams_list_entries.
84:
85: l_cursor_name := DBMS_SQL.open_cursor;
86: --insert into temp(text2) values('after open cursor');commit;
87:

Line 190: -- Function : Replaces all noise words for the relevant fields in AMS_LIST_ENTRIES

186: -- Start of Comments
187: --
188: -- Name : Filter_Word
189: -- Type : Private
190: -- Function : Replaces all noise words for the relevant fields in AMS_LIST_ENTRIES
191: --
192: -- Pre-reqs : None
193: -- Paramaeters :
194: -- IN :

Line 261: -- Function : Replaces all noise words for the relevant fields in AMS_LIST_ENTRIES

257: -- Start of Comments
258: --
259: -- Name : Dedupe_List
260: -- Type : Private
261: -- Function : Replaces all noise words for the relevant fields in AMS_LIST_ENTRIES
262: --
263: -- Pre-reqs : None
264: -- Paramaeters :
265: -- IN :

Line 269: -- p_object_name VARCHAR2 := 'AMS_LIST_ENTRIES'

265: -- IN :
266: -- p_list_header_id AMS_LIST_HEADERS_ALL.LIST_HEADER_ID%TYPE
267: -- p_enabled_wordreplacement_flag AMS_LIST_HEADERS_ALL.ENABLED_WORDREPLACEMENT_FLAG%TYPE
268: -- p_send_to_log VARCHAR2 := 'N'
269: -- p_object_name VARCHAR2 := 'AMS_LIST_ENTRIES'
270: --
271: -- HISTORY
272: -- 08/02/1999 khung created
273: -- 09/30/1999 khung add the capability to dedupe the entries

Line 282: ,p_object_name VARCHAR2 := 'AMS_LIST_ENTRIES'

278: (p_list_header_id AMS_LIST_HEADERS_ALL.LIST_HEADER_ID%TYPE
279: ,p_enable_word_replacement_flag
280: AMS_LIST_HEADERS_ALL.ENABLE_WORD_REPLACEMENT_FLAG%TYPE
281: ,p_send_to_log VARCHAR2 := 'N'
282: ,p_object_name VARCHAR2 := 'AMS_LIST_ENTRIES'
283: )
284: RETURN NUMBER IS
285: -- the set of rules associated with a list.
286: CURSOR c_list_rules (my_list_header_id IN NUMBER)

Line 317: FROM ams_list_entries

313: -- we also exclude any records where the dedupe flag is already set.
314: CURSOR c_dedupe_keys (my_list_header_id IN NUMBER)
315: IS
316: SELECT DISTINCT dedupe_key, COUNT (dedupe_key)
317: FROM ams_list_entries
318: WHERE list_header_id = my_list_header_id
319: -- AND marked_as_duplicate_flag IS NULL --commented by VB
320: -- 09/30/2000 because this is a not null column in database
321: GROUP BY dedupe_key;

Line 333: --l_list_entry_id ams_list_entries.list_entry_id%TYPE;

329: l_fields VARCHAR2(10000);
330: --l_temp_fields VARCHAR2(10000);
331: l_no_of_masters NUMBER := 0;
332: l_list_rule_id ams_list_rules_all.list_rule_id%TYPE;
333: --l_list_entry_id ams_list_entries.list_entry_id%TYPE;
334: l_last_dedupe_by ams_list_headers_all.last_deduped_by_user_id%TYPE;
335: l_dedupe_key ams_list_entries.dedupe_key%TYPE;
336: l_dedupe_key_count NUMBER;
337: l_rank_count NUMBER;

Line 335: l_dedupe_key ams_list_entries.dedupe_key%TYPE;

331: l_no_of_masters NUMBER := 0;
332: l_list_rule_id ams_list_rules_all.list_rule_id%TYPE;
333: --l_list_entry_id ams_list_entries.list_entry_id%TYPE;
334: l_last_dedupe_by ams_list_headers_all.last_deduped_by_user_id%TYPE;
335: l_dedupe_key ams_list_entries.dedupe_key%TYPE;
336: l_dedupe_key_count NUMBER;
337: l_rank_count NUMBER;
338: i BINARY_INTEGER := 1;
339:

Line 349: IF (p_object_name = 'AMS_LIST_ENTRIES') THEN

345: empty_list_rules rule_details;
346: l_no_of_duplicates number := 0;
347: BEGIN
348:
349: IF (p_object_name = 'AMS_LIST_ENTRIES') THEN
350: l_sql_stmt1 := 'update ams_list_entries set dedupe_key = ';
351: ELSIF (p_object_name = 'AMS_IMP_SOURCE_LINES') THEN
352: l_sql_stmt1 := 'update ams_imp_source_lines set dedupe_key = ';
353: ELSE

Line 350: l_sql_stmt1 := 'update ams_list_entries set dedupe_key = ';

346: l_no_of_duplicates number := 0;
347: BEGIN
348:
349: IF (p_object_name = 'AMS_LIST_ENTRIES') THEN
350: l_sql_stmt1 := 'update ams_list_entries set dedupe_key = ';
351: ELSIF (p_object_name = 'AMS_IMP_SOURCE_LINES') THEN
352: l_sql_stmt1 := 'update ams_imp_source_lines set dedupe_key = ';
353: ELSE
354: RETURN 0;

Line 378: UPDATE ams_list_entries

374: -- if a dedupe has never been perfomed then this field will contains
375: -- NULLS and there is no
376: -- need to perform this update
377: IF (l_last_dedupe_by IS NOT NULL) THEN
378: UPDATE ams_list_entries
379: SET dedupe_key = NULL
380: -- ,marked_as_duplicate_flag = NULL
381: -- because column is not null in database
382: WHERE list_header_id = p_list_header_id;

Line 436: IF (p_object_name = 'AMS_LIST_ENTRIES') THEN

432: --we have more than one rule for this list
433: --we must ensure that the key gets reset to NULL for the list to
434: -- ensure accurate results.
435: -- removed khung 07/07/1999
436: IF (p_object_name = 'AMS_LIST_ENTRIES') THEN
437: UPDATE ams_list_entries
438: SET dedupe_key = NULL
439: WHERE list_header_id = p_list_header_id
440: AND marked_as_duplicate_flag IS NULL;

Line 437: UPDATE ams_list_entries

433: --we must ensure that the key gets reset to NULL for the list to
434: -- ensure accurate results.
435: -- removed khung 07/07/1999
436: IF (p_object_name = 'AMS_LIST_ENTRIES') THEN
437: UPDATE ams_list_entries
438: SET dedupe_key = NULL
439: WHERE list_header_id = p_list_header_id
440: AND marked_as_duplicate_flag IS NULL;
441: COMMIT;

Line 538: --l_sql_stmt1 := 'update ams_list_entries set dedupe_key =';

534: --constucting the valid sql to be executed.
535: -- 08/02/99 khung, modified using Native Dynamic SQL
536:
537: -- removed by khung 09/30/1999 to support AMS_IMP_SOURCE_LINES
538: --l_sql_stmt1 := 'update ams_list_entries set dedupe_key =';
539: l_sql_stmt2 := l_sql_stmt1;
540: l_sql_stmt2 := l_sql_stmt2 ||
541: l_fields ||
542: ' where list_header_id =' ||

Line 583: UPDATE ams_list_entries

579:
580: IF (l_rank_count = 0)
581: THEN -- there are no ranks assoociated with the list source so we can choose at random.
582:
583: UPDATE ams_list_entries
584: SET marked_as_duplicate_flag = 'Y',
585: enabled_flag='N' --modified vb 11/7/2000
586: WHERE list_header_id = p_list_header_id
587: AND dedupe_key = l_dedupe_key

Line 589: FROM ams_list_entries c

585: enabled_flag='N' --modified vb 11/7/2000
586: WHERE list_header_id = p_list_header_id
587: AND dedupe_key = l_dedupe_key
588: AND list_entry_id <> ( SELECT MIN (c.list_entry_id)
589: FROM ams_list_entries c
590: WHERE c.list_header_id = p_list_header_id
591: AND c.dedupe_key = l_dedupe_key);
592: ELSE --there are ranks associated with at least one list source.
593: --modified vb 10/19/2000 to fix bug where dedup not working with more than 1 rank

Line 594: UPDATE ams_list_entries

590: WHERE c.list_header_id = p_list_header_id
591: AND c.dedupe_key = l_dedupe_key);
592: ELSE --there are ranks associated with at least one list source.
593: --modified vb 10/19/2000 to fix bug where dedup not working with more than 1 rank
594: UPDATE ams_list_entries
595: SET marked_as_duplicate_flag = 'Y',enabled_flag='N'--modified vb 11/7/2000
596: WHERE list_header_id = p_list_header_id
597: AND dedupe_key = l_dedupe_key
598: AND list_entry_id <> ( SELECT MIN (c.list_entry_id)

Line 600: FROM ams_list_entries c,

596: WHERE list_header_id = p_list_header_id
597: AND dedupe_key = l_dedupe_key
598: AND list_entry_id <> ( SELECT MIN (c.list_entry_id)
599: --selecting the master.
600: FROM ams_list_entries c,
601: ams_list_select_actions a
602: WHERE c.list_header_id =
603: p_list_header_id
604: AND c.dedupe_key = l_dedupe_key

Line 654: FROM ams_list_entries

650: --recording the number of duplicates found.
651: UPDATE ams_list_headers_all
652: SET no_of_rows_duplicates = (
653: SELECT COUNT (*)
654: FROM ams_list_entries
655: WHERE list_header_id = p_list_header_id
656: AND marked_as_duplicate_flag = 'Y')
657: WHERE list_header_id = p_list_header_id
658: returning no_of_rows_duplicates into l_no_of_duplicates;