DBA Data[Home] [Help]

APPS.BIX_KPI_CLS_RPT_PKG SQL Statements

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

Line: 19

   SELECT fnd_profile.value('BIX_DM_CURR_CONVERSION_TYPE')
     INTO l_conv_type
     FROM dual;
Line: 55

   SELECT fnd_profile.value('BIX_DM_RPT_TIME_RANGE')
     INTO l_time_range
     FROM dual;
Line: 66

   /* Form the SQL string to insert the rows into the temp table.
      For null classifications, 'z99' was chosen as the default classifcation
      id so that it always appears as the last row in the report */
   g_sqlstmt := 'INSERT /*+ PARALLEL(tr,2) */ INTO BIX_DM_REPORT tr
	   ( session_id, report_code, col1, col2, col3, col4, col6, col8,
	   col10, col12, col14, col16, col18, col20, col22, col24,
	   col26, col28, col30 )
        (SELECT /*+ PARALLEL(a,2) */ :session_id, ''BIX_KPI_CLS_RPT'' ,
		          nvl(to_char(a.classification_id), ''z99'') || ''y'' ';
Line: 76

   /* If total row then insert classification description */
   /* if not then insert the time range                   */
   IF (p_total_row_ind = FALSE)
   THEN
       g_sqlstmt :=  g_sqlstmt || ', null ';
Line: 113

                , SUM(a.leads_updated)
       , to_char(SUM(DECODE(:user_currency, a.currency_code, a.leads_amount_txn,
                  ((a.leads_amount / :denom_rate) * :num_rate ))), :format_mask)
			 , SUM(a.opportunities_created)
			 , SUM(a.opportunities_updated)
			 , SUM(a.opportunities_won)
          , to_char(SUM(DECODE(:user_currency, a.currency_code,
			   a.opportunities_won_amount_txn,
  ((a.opportunities_won_amount / :denom_rate) * :num_rate ))), :format_mask) ';
Line: 206

/*  This procedure inserts data into the temp table.
*/
PROCEDURE insert_temp_table(p_total_row_ind     IN BOOLEAN,
                            p_session_id        IN NUMBER,
                            p_classification_id IN NUMBER,
                            p_site_id           IN NUMBER,
                            p_start_date        IN DATE,
                            p_end_date          In DATE,
                            p_user_currency     IN VARCHAR2,
                            p_denom_rate        IN NUMBER,
                            p_num_rate          In NUMBER )
IS
  l_format_mask VARCHAR2(50);
Line: 224

   /* Form and execute the SQL statement to insert into the temp table  */
   /* all the rows coreesponding to the classifications user has chosen */
   form_sqlstmt(p_total_row_ind, p_classification_id, p_site_id);
Line: 256

END insert_temp_table;
Line: 294

  SELECT sysdate
  INTO   l_sysdate
  FROM   dual;
Line: 323

	SELECT MAX(period_start_date)
	  INTO v_temp_date
          FROM  bix_dm_agent_call_sum;
Line: 384

  /* Delete the table for the current icx session and report  */
    DELETE from bix_dm_report
     WHERE report_code = 'BIX_KPI_CLS_RPT'
       AND session_id  = l_session_id;
Line: 390

  SELECT fnd_profile.value('BIX_DM_PREFERRED_CURRENCY')
  INTO   l_global_currency
  FROM   dual;
Line: 395

  SELECT fnd_profile.value('JTF_PROFILE_DEFAULT_CURRENCY')
  INTO   l_user_currency
  FROM   dual;
Line: 424

  /* Insert the total rows corresponding to the classification */
  insert_temp_table(l_total_row_ind, l_session_id, l_classification_id,
           l_site_id, l_start_date, l_end_date, l_user_currency,
		 l_denom_rate, l_num_rate );
Line: 445

             UPDATE bix_dm_report
                SET col1 = 'z99n'
              WHERE col1 = 'z99y'
                AND report_code = 'BIX_KPI_CLS_RPT'
                AND session_id  = l_session_id;
Line: 453

             UPDATE bix_dm_report
                SET col1 = to_char(l_classification_id) || 'n'
              WHERE col1 = to_char(l_classification_id) || 'y'
                AND report_code = 'BIX_KPI_CLS_RPT'
                AND session_id  = l_session_id;
Line: 461

         /* summary table and insert them into bix temp table             */
 	 l_total_row_ind := FALSE;
Line: 463

         insert_temp_table( l_total_row_ind, l_session_id,
		  l_classification_id, l_site_id, l_start_date, l_end_date,
		  l_user_currency,l_denom_rate, l_num_rate );