[Home] [Help]
391: -- checking to see if there are any List Source Ranks associated
392: -- with the List.
393: SELECT COUNT (rank)
394: INTO l_rank_count
395: FROM ams_list_select_actions
396: WHERE action_used_by_id = p_list_header_id
397: and arc_action_used_by = 'LIST';
398:
399: IF (p_send_to_log = 'Y')
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
608: AND enabled_flag='Y' -- added by hbandi for the BUG #8605416
608: AND enabled_flag='Y' -- added by hbandi for the BUG #8605416
609: AND c.list_select_action_id = a.list_select_action_id);
610: /*
611: AND a.rank =(SELECT min(b.rank)
612: FROM ams_list_select_actions b
613: WHERE b.action_used_by_id = p_list_header_id
614: and b.arc_action_used_by = 'LIST')
615: GROUP BY a.rank); */
616: --even if there are no ranks for this sql stmt we will still