DBA Data[Home] [Help]

APPS.BIX_CALLS_HANDLED_RPT_PKG SQL Statements

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

Line: 24

  /* Form the SQL string to insert the rows into the temp table */
  g_sqlstmt := '
    INSERT /*+ PARALLEL(tr,2) */ INTO bix_dm_report tr (
			    session_id
			 ,  report_code
			 ,  col3
			 ,  col4
			 ,  col5
			 ,  col6
			 ,  col7
			 ,  col8
			 ,  col10
			 ,  col12
			 ,  col13
			 ,  col14
			 ,  col15
			 ,  col16
			 ,  col17
			 ,  col18
			 ,  col20
			 ,  col22
			 ,  col23
			 ,  col24
			 ,  col25
			 ,  col26
			 ,  col27
			 ,  col28
			 ,  col30
			 ,  col32
			 ,  col34
			 ,  col36
			 ,  col38
			 ,  col40 )
  (SELECT /*+ PARALLEL(a,2) */
			   :session_id
			 , ''BIX_CALLS_HANDLED_RPT'' ';
Line: 209

  /* Form the SQL string to insert the rows into the temp table */
  g_sqlstmt := '
    INSERT /*+ PARALLEL(tr,2) */ INTO bix_dm_report tr (
			    session_id
			 ,  report_code
			 ,  col2
			 ,  col3
			 ,  col4
			 ,  col5
			 ,  col7
			 ,  col8
			 ,  col10
			 ,  col12
			 ,  col13
			 ,  col14
			 ,  col15
			 ,  col16
			 ,  col17
			 ,  col18
			 ,  col20
			 ,  col22
			 ,  col23
			 ,  col24
			 ,  col25
			 ,  col26
			 ,  col27
			 ,  col28
			 ,  col30
			 ,  col32
			 ,  col34
			 ,  col36
			 ,  col38
			 ,  col40 )
  (SELECT /*+ PARALLEL(a,2) */
			   :session_id
			 , ''BIX_CALLS_HANDLED_RPT'' ';
Line: 366

/* This procedure form and execute the SQL statement to insert into */
/* BIX temp table all the detail rows of a resource                 */
PROCEDURE insert_rs_detail_temp_table(p_agent_id IN NUMBER)
IS
BEGIN

  /* Form and execute the SQL statement to insert into the temp table  */
  /* all the detail rows corresponding to the agent p_agent_id         */
  form_rs_sqlstmt(FALSE);
Line: 380

END insert_rs_detail_temp_table;
Line: 383

/* insert into BIX temp table the total row of a resource */
PROCEDURE insert_rs_total_temp_table(p_group_id IN NUMBER)
IS
BEGIN

  /* Form and execute the SQL statement to insert into the temp table one  */
  /* row for each of the agents which belong to the agent group p_group_id */
  form_rs_sqlstmt(TRUE);
Line: 396

END insert_rs_total_temp_table;
Line: 398

/* This procedure form and execute the SQL statement to insert both */
/* the detail and total row for the agent group                     */
PROCEDURE insert_group_temp_table(p_group_id IN NUMBER)
IS
BEGIN

  /* Form and execute the SQL statement to insert into the temp table */
  /* the total row corresponding to the agent group "p_group_id"      */
  form_group_sqlstmt(TRUE);
Line: 409

  /* Form and execute the SQL statement to insert into the temp table one row for each */
  /* of the agent groups which are immediate children of the group p_group_id          */
  form_group_sqlstmt(FALSE);
Line: 417

END insert_group_temp_table;
Line: 441

    SELECT MAX(period_start_date)
    INTO   l_temp_date
    FROM   bix_dm_agent_call_sum;
Line: 449

    /* Period Indicator = 7 indicates that user has selected today as reporting period */
    g_from_date := to_date(to_char(g_sysdate, 'dd/mm/yyyy') || ' 00:00:00','dd/mm/yyyy hh24:mi:ss');
Line: 454

    /* Period Indicator = 8 indicates that user has selected yesterday as reporting period */
    g_from_date := to_date(to_char(g_sysdate-1, 'dd/mm/yyyy') || ' 00:00:00','dd/mm/yyyy hh24:mi:ss');
Line: 487

  SELECT icx_sec.g_session_id
  INTO   g_session_id
  FROM   dual;
Line: 491

  /* Delete the rows from the table bix_dm_report for the current icx session and report  */
  /* so that we donot display the leftover rows from the previous execution of the report */
  DELETE bix_dm_report
  WHERE  report_code = 'BIX_CALLS_HANDLED_RPT'
  AND    session_id  = g_session_id;
Line: 498

  SELECT sysdate
  INTO   g_sysdate
  FROM   dual;
Line: 503

  SELECT fnd_profile.value('BIX_DM_RPT_TIME_RANGE')
  INTO   g_time_range
  FROM   dual;
Line: 525

    SELECT TO_NUMBER(substr(g_parent, 2, decode(instr(g_parent,'c'), 0, length(g_parent), instr(g_parent,'c')-2)))
    INTO   l_group_id
    FROM   dual;
Line: 534

  /* If the user has selected "All" for agent group paramter , display the default group of the user */
  IF (l_group_id = -999) THEN
    SELECT fnd_profile.value('BIX_DM_DEFAULT_GROUP')
    INTO   l_group_id
    FROM   dual;
Line: 541

  /* l_group_id = "null" : user has selected "All" as agent group paramter */
  /* and (s)he is not assigned to any default group                        */
  IF (l_group_id IS NULL) THEN
    RETURN;
Line: 548

  insert_group_temp_table(l_group_id);
Line: 551

  insert_rs_total_temp_table(l_group_id);
Line: 554

  /* to insert the detail rows of the agent into the temp table     */
  IF (instr(g_parent,'c') <> 0) THEN
    l_agent_id := TO_NUMBER(substr(g_parent, instr(g_parent, 'c')+1, length(g_parent) - (instr(g_parent,'c')+1)));
Line: 561

	 /* Update the temp table so that next time the user clicked on the */
	 /* same agent we donot display the detail rows of the agent again  */
	 UPDATE bix_dm_report
	 SET col3          = 'p' || l_group_id || 'c' || to_char(l_agent_id) || 'y'
	 WHERE col3        = 'p' || l_group_id || 'c' || to_char(l_agent_id) || 'n'
	 AND   report_code = 'BIX_CALLS_HANDLED_RPT'
      AND   session_id  = g_session_id;
Line: 570

      /* summary table and insert them into bix temp table    */
      insert_rs_detail_temp_table(l_agent_id);