DBA Data[Home] [Help]

APPS.FV_TBAL_BY_TS SQL Statements

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

Line: 30

 SELECT name, chart_of_accounts_id FROM gl_ledgers_public_v
 WHERE  ledger_id = p_ledger_id;
Line: 35

/* Bug 6244171 - Current query for cursor commented out and new select statement added to fetch correct segment*/
/* SELECT fifsv.application_column_name
 FROM
        fnd_id_flex_segments_vl       fifsv,
        fnd_segment_attribute_values  fsav
 WHERE
        fifsv.application_id = 101
 AND    fifsv.id_flex_code   = 'GL#'
 AND    fifsv.id_flex_num    = fsav.id_flex_num
 AND    fifsv.id_flex_num    = p_chart_of_accounts_id
 AND    fsav.segment_attribute_type = p_attribute_type; */
Line: 47

 SELECT application_column_name
 FROM
        fnd_segment_attribute_values
 WHERE
        application_id = 101
 AND    id_flex_code   = 'GL#'
 AND    id_flex_num    = p_chart_of_accounts_id
 AND    segment_attribute_type = p_attribute_type
 AND    attribute_value = 'Y';
Line: 63

v_select_begin_balance  VARCHAR2(2000);
Line: 64

v_select_period_dr  	VARCHAR2(2000);
Line: 65

v_select_period_cr  	VARCHAR2(2000);
Line: 103

          v_select_begin_balance :=
                  'SUM(NVL(begin_balance_dr, 0) - NVL(begin_balance_cr, 0))';
Line: 106

          v_select_period_dr := 'SUM(NVL(period_net_dr, 0))';
Line: 107

          v_select_period_cr := 'SUM(NVL(period_net_cr, 0))';
Line: 125

    	        v_select_begin_balance :=
                     'SUM(DECODE(glb.period_name, ''' || v_first_period || ''',
                      NVL(begin_balance_dr, 0) - NVL(begin_balance_cr, 0), 0))';
Line: 129

                v_select_period_dr :=
                     'SUM(DECODE(glb.period_name, '''||p_period_name||''',
		      NVL(begin_balance_dr,0) + NVL(period_net_dr,0),0) + '||
		     'DECODE(glb.period_name, ''' ||v_first_period || ''',
                      - NVL(begin_balance_dr, 0),0))';
Line: 135

		v_select_period_cr :=
                     'SUM(DECODE(glb.period_name, ''' ||p_period_name||''',
                      NVL(begin_balance_cr,0) + NVL(period_net_cr,0),0) + '||
                     'DECODE(glb.period_name, ''' ||v_first_period || ''',
                      - NVL(begin_balance_cr, 0), 0))';
Line: 149

	 ' INSERT INTO fv_facts_temp
		(treasury_symbol_id, sgl_acct_number, fct_int_record_category,
		 amount, amount1, amount2 '||
		 REPLACE(v_group_by, 'glcc.' )||')'||
         ' SELECT
                 fts.treasury_symbol_id,
                 glcc.'||v_acc_seg_name||', ''STBAL'','||
		 v_select_begin_balance||', '||
		 v_select_period_dr||', '||
		 v_select_period_cr||
		 v_group_by||
         ' FROM  gl_balances glb,
                 gl_code_combinations glcc,
                 fv_treasury_symbols fts,
                 fv_fund_parameters ffp
	   WHERE glcc.chart_of_accounts_id = '||v_chart_of_accounts_id||
         ' AND   glcc.template_id IS NULL
	   AND   glb.code_combination_id = glcc.code_combination_id
	   AND   fts.treasury_symbol_id = ffp.treasury_symbol_id
	   AND   fts.set_of_books_id = '||g_sob_id||
	 ' AND   ffp.fund_value      = glcc.'||v_bal_seg_name||
	 ' AND  (fts.treasury_symbol
                      BETWEEN '''||p_treasury_symbol_low||''' AND '''||
                                 p_treasury_symbol_high||''' )
           AND   glb.ledger_id = '||g_sob_id||
	 ' AND   glb.actual_flag = ''A''
           AND   glb.period_name IN '||v_period_list||'
	   AND   glb.currency_code = '''||p_currency_code||'''
           AND   (glb.translated_flag <> ''R''
			OR glb.translated_flag IS NULL)
	   GROUP BY fts.treasury_symbol_id, glcc.'||v_acc_seg_name ||
                    v_group_by ;
Line: 183

       FV_UTILITY.LOG_MESG(FND_LOG.LEVEL_STATEMENT, l_module_name,'Select: '|| v_statement);
Line: 221

     DELETE
     FROM   fv_facts_temp
     WHERE  fct_int_record_category = 'STBAL';
Line: 243

        SELECT column_name
        FROM   fa_rx_rep_columns_b
        WHERE  report_id = x_report_id
        AND    attribute_set = x_attribute_set
        AND    break = 'Y';