DBA Data[Home] [Help]

APPS.AMS_LISTDEDUPE_PVT dependencies on AMS_LIST_ENTRIES

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

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

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

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

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

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

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

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

Line 283: ,p_object_name VARCHAR2 := 'AMS_LIST_ENTRIES'

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

Line 318: FROM ams_list_entries

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

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

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

Line 336: l_dedupe_key ams_list_entries.dedupe_key%TYPE;

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

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

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

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

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

Line 379: UPDATE ams_list_entries

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

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

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

Line 438: UPDATE ams_list_entries

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

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

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

Line 584: UPDATE ams_list_entries

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

Line 590: FROM ams_list_entries c

586: enabled_flag='N' --modified vb 11/7/2000
587: WHERE list_header_id = p_list_header_id
588: AND dedupe_key = l_dedupe_key
589: AND list_entry_id <> ( SELECT MIN (c.list_entry_id)
590: FROM ams_list_entries c
591: WHERE c.list_header_id = p_list_header_id
592: AND c.dedupe_key = l_dedupe_key
593: AND enabled_flag='Y' -- added by hbandi for the BUG #8358168
594: );

Line 597: UPDATE ams_list_entries

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

Line 603: FROM ams_list_entries c,

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

Line 658: FROM ams_list_entries

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