DBA Data[Home] [Help]

APPS.AMS_LIST_OPTIONS_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 22

SELECT *
  FROM ams_list_headers_all
 WHERE list_header_id = p_list_header_id;
Line: 27

SELECT count(1)
  FROM ams_list_entries
 WHERE list_header_id = p_list_header_id
   AND enabled_flag = 'Y';
Line: 105

   g_msg_tbl.delete;
Line: 125

SELECT list_entry_id
  FROM ams_list_entries
 WHERE list_header_id = p_list_header_id
   AND enabled_flag  = 'Y'
ORDER BY randomly_generated_number ;
Line: 132

select user_status_id
from ams_user_Statuses_vl
where system_status_code = p_status_code
  and system_status_type = 'AMS_LIST_STATUS';*/
Line: 150

select sum(decode(enabled_flag,'N',0,1)),
       sum(decode(enabled_flag,'Y',0,1)),
       sum(1),
       sum(decode(part_of_control_group_flag,'Y',1,0)),
       sum(decode(marked_as_random_flag,'Y',1,0)),
       sum(decode(marked_as_duplicate_flag,'Y',1,0)),
       sum(decode(manually_entered_flag,
                     'Y',decode(enabled_flag,'Y','1',0),
                     0)),
       sum(decode(MARKED_AS_SUPPRESSED_FLAG,'Y',1,0)),
       sum(decode(MARKED_AS_FATIGUED_FLAG,'Y',1,0)),
       sum(decode(TCA_LOAD_STATUS,'ERROR',1,0))
 from ams_list_entries
where list_header_id = p_list_header_id ;
Line: 208

   update ams_list_entries  -- need this when the CG is generated seperately..
      set part_of_control_group_flag = 'N',
          enabled_flag = 'Y'
    where part_of_control_group_flag = 'Y'
      and enabled_flag = 'N'
      and list_header_id = p_list_header_id;
Line: 216

      write_to_act_log('CG option not selected.','LIST',p_list_header_id,'LOW');
Line: 228

         l_total_random_rows  := nvl(g_list_header_info.ctrl_random_nth_row_selection,0);
Line: 233

         write_to_act_log('Control group generation option is percentage. % of rows to be made part of control group is '||g_list_header_info.ctrl_random_pct_row_selection,'LIST',p_list_header_id,'LOW');
Line: 234

         l_total_random_rows  := floor((g_list_entry_count * nvl(g_list_header_info.ctrl_random_pct_row_selection,0)) / 100);
Line: 250

      UPDATE ams_list_entries
         SET randomly_generated_number = DBMS_RANDOM.random
       WHERE list_header_id  = p_list_header_id
         AND enabled_flag = 'Y';
Line: 265

         UPDATE ams_list_entries
            SET part_of_control_group_flag = 'Y',
                enabled_flag = 'N'
          WHERE list_header_id  = p_list_header_id
            AND list_entry_id   = g_list_entries_id(i);
Line: 290

   update ams_list_headers_all
      set no_of_rows_in_list           = nvl(l_no_of_rows_in_list,0),
          no_of_rows_active            = nvl(l_no_of_rows_active,0),
          no_of_rows_inactive          = nvl(l_no_of_rows_inactive,0),
          no_of_rows_in_ctrl_group     = nvl(l_no_of_rows_in_ctrl_group,0),
          no_of_rows_random            = nvl(l_no_of_rows_random,0),
          no_of_rows_duplicates        = nvl(l_no_of_rows_duplicates,0),
          no_of_rows_manually_entered  = nvl(l_no_of_rows_manually_entered,0),
          no_of_rows_suppressed        = nvl(l_no_of_rows_suppressed,0),
          no_of_rows_fatigued          = nvl(l_no_of_rows_fatigued,0),
          tca_failed_records           = nvl(l_TCA_FAILED_RECORDS,0),
          ctrl_status_code = decode(ctrl_gen_mode,'NONE','DRAFT','AVAILABLE'),
          status_code = nvl(status_code_old,status_code),
          last_update_date = sysdate,
	  user_status_id = l_status_id
    where list_header_id = p_list_header_id;
Line: 307

   update ams_list_headers_all
      set status_code_old = null
    where list_header_id = p_list_header_id;
Line: 312

   if nvl(g_list_header_info.ctrl_gen_mode,'NONE') = 'DEFBYCNT' and nvl(g_list_header_info.ctrl_random_nth_row_selection,0) > 0 then
      if nvl(l_no_of_rows_in_ctrl_group,0) < nvl(g_list_header_info.ctrl_random_nth_row_selection,0) then
         write_to_act_log('Resetting the control group count to '||l_no_of_rows_in_ctrl_group||' since the given CG size is higher than actual size.', 'LIST', p_list_header_id,'HIGH');
Line: 315

         update ams_list_headers_all
            set ctrl_random_nth_row_selection = l_no_of_rows_in_ctrl_group
          where list_header_id = p_list_header_id;
Line: 326

      update ams_list_headers_all
         set ctrl_status_code = 'FAILED',
             status_code = nvl(status_code_old,status_code),
             last_update_date = sysdate,
             user_status_id = l_status_id
       where list_header_id = p_list_header_id;
Line: 349

SELECT list_entry_id
  FROM ams_list_entries
 WHERE list_header_id = p_list_header_id
   AND marked_as_random_flag = 'Y'
   AND enabled_flag  = 'N'
ORDER BY randomly_generated_number ;
Line: 371

   write_to_act_log(g_list_header_info.main_random_pct_row_selection||' % of rows to be generated randomly ','LIST',p_list_header_id,'LOW');
Line: 374

   if nvl(g_list_header_info.main_random_pct_row_selection,0) between 1 and 100 then
      l_total_random_rows  := FLOOR ((g_list_entry_count * g_list_header_info.main_random_pct_row_selection) / 100);
Line: 384

   UPDATE ams_list_entries
      SET randomly_generated_number = DBMS_RANDOM.random,
          marked_as_random_flag = 'Y',
          enabled_flag = 'N'
    WHERE list_header_id  = p_list_header_id
      AND enabled_flag = 'Y';
Line: 399

      UPDATE ams_list_entries
         SET marked_as_random_flag = 'Y',
             enabled_flag = 'Y'
       WHERE list_header_id  = g_list_header_info.list_header_id
         AND list_entry_id   = g_list_entries_id(i);
Line: 424

  SELECT e.list_entry_id
    FROM ams_list_entries e
   WHERE e.list_header_id = p_list_header_id
     AND e.enabled_flag ='Y';
Line: 444

   if (nvl(g_list_header_info.no_of_rows_max_requested,0)  > 0 )  then -- already the row selection type is set to MAX.
      if (g_list_entry_count  <= g_list_header_info.no_of_rows_max_requested) then
         write_to_act_log('No of max entries specified is greater than or equal to the no of available entries. No need to reduce the size.'
			, 'LIST', p_list_header_id, 'HIGH');
Line: 454

         UPDATE ams_list_entries
            SET enabled_flag = 'N'
          WHERE list_header_id  = p_list_header_id
            AND list_entry_id   = g_list_entries_id(i);
Line: 489

   g_msg_tbl.delete;
Line: 519

   if nvl(g_list_header_info.row_selection_type,'x') = 'MAX' then
      write_to_act_log('Max size option chosen for size reduction','LIST',p_list_header_id,'LOW');
Line: 527

   elsif nvl(g_list_header_info.row_selection_type,'x') = 'RANDOM' then
      write_to_act_log('Random % option chosen for size reduction','LIST',p_list_header_id,'LOW');
Line: 534

   elsif nvl(g_list_header_info.row_selection_type,'x') = 'STANDARD' then
      write_to_act_log('All records option chosen. Hence not restricting the size.','LIST',p_list_header_id,'LOW');