DBA Data[Home] [Help]

APPS.AP_ACCTG_DATA_FIX_PKG SQL Statements

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

Line: 21

     SELECT TO_CHAR(SYSDATE, '-HH24:MI:SS')
     INTO   l_date
     FROM   DUAL;
Line: 28

    SELECT decode(instr(value,','),0,value,
                   SUBSTR (value,1,instr(value,',') - 1))
    INTO   l_file_location
    FROM   v$parameter
    WHERE  name = 'utl_file_dir';
Line: 77

    ' as select * from XLA_EVENTS where rownum<1 ';
Line: 81

    ' add datafix_update_date date default sysdate';
Line: 85

    ' as select * from XLA_AE_HEADERS where rownum<1 ';
Line: 89

    ' add datafix_update_date date default sysdate';
Line: 93

    ' as select * from XLA_AE_LINES where rownum<1 ';
Line: 97

    ' add datafix_update_date date default sysdate';
Line: 101

    ' as select * from XLA_DISTRIBUTION_LINKS where rownum<1 ';
Line: 105

    ' add datafix_update_date date default sysdate';
Line: 109

    ' as select * from XLA_TRANSACTION_ENTITIES where rownum<1 ';
Line: 113

    ' add datafix_update_date date default sysdate';
Line: 144

  stmt_str := 'select column_name from '|| l_all_tab_columns ||
              ' where table_name=:1 and column_name<>''DATAFIX_UPDATE_DATE''';
Line: 187

    sql_liab_stat := 'select count(*) from '|| l_tables ||
                    ' where table_name='||''''||'HEADERS_'||P_Bug_number||'''';
Line: 218

    sql_liab_stat := 'insert into events_'||P_Bug_Number||'('||col_str5||') '||
                     ' select '||col_str5||' from xla_events '||
                     ' where  event_id in '||
    ' (select event_id from ap_temp_data_driver_'||P_Bug_Number||
    ' Where process_flag=''Y'')';
Line: 226

    sql_liab_stat := 'insert into headers_'||P_Bug_Number||'('||col_str1||') '||
                     ' select '||col_str1||' from xla_ae_headers '||
                     ' where  event_id in '||
    ' (select event_id from ap_temp_data_driver_'||P_Bug_Number||
    ' Where process_flag=''Y'')';
Line: 234

    sql_liab_stat := 'insert into lines_'||P_Bug_Number||'('||col_str2||') '||
                     ' select '||col_str2||' from xla_ae_lines '||
                     ' where  ae_header_id in '||
    ' (select ae_header_id from headers_'||P_Bug_Number||') ';
Line: 241

    sql_liab_stat := 'insert into distrib_links_'||P_Bug_Number||'('||col_str3||') '||
                     ' select '||col_str3||' from xla_distribution_links '||
                     ' where  ae_header_id in '||
   ' (select ae_header_id from headers_'||P_Bug_Number||') ';
Line: 248

/*    sql_liab_stat := 'insert into trans_entities_'||P_Bug_Number||'('||col_str4||') '||
                     ' select '||col_str4||' from xla_transaction_entities '||
                     ' where  entity_id in '||
   ' (select entity_id from ap_temp_data_driver_'||P_Bug_Number||') ';
Line: 294

    (p_select_list       in VARCHAR2,
     p_table_in          in VARCHAR2,
     p_where_in          in VARCHAR2,
     P_calling_sequence  in VARCHAR2) IS

     l_calling_sequence varchar2(500);
Line: 300

   select_list1 varchar2(2000):=P_SELECT_LIST;
Line: 342

   dot_loc := INSTR(select_list1,',');
Line: 346

    col_list := col_list || ', ' || select_list1;
Line: 348

    colname (col_count) := select_list1;
Line: 353

    col_list := col_list || ', ' || SUBSTR (select_list1, 1, dot_loc-1);
Line: 355

    colname (col_count) := SUBSTR (select_list1, 1, dot_loc-1);
Line: 357

      select_list1:=SUBSTR (select_list1, dot_loc+1);
Line: 367

      SELECT data_type,DATA_LENGTH
        INTO coltype (col_count) ,collen(col_count)
        FROM all_tab_columns
       WHERE owner = owner_nm
         AND table_name = table_nm
         AND column_name=colname (col_count);
Line: 397

       'SELECT ' || col_list ||
       '  FROM ' || p_table_in || ' ' || where_clause,
       1);
Line: 458

        l_message := 'SELECT ' || col_list ||
               '  FROM ' || p_table_in || ' ' || where_clause||'

';

Line: 472

   table. It also takes in as input SELECT LIST which determine
   the list of columns which will be backed up. The additional
   WHERE caluse can also be passed in as input. */

Procedure Backup_data
    (p_source_table      in VARCHAR2,
     p_destination_table in VARCHAR2,
     p_select_list       in VARCHAR2,
     p_where_clause      in VARCHAR2,
     P_calling_sequence  in VARCHAR2) is

  l_calling_sequence            varchar2(500);
Line: 496

       sql_stmt := 'select count(*) from '|| l_tables ||
                   ' where table_name='||''''||p_destination_table||'''';
Line: 507

       ' as select  '||p_select_list||' from '||
       p_source_table||' where rownum<1 ';
Line: 512

       ' add datafix_update_date date default sysdate';
Line: 516

    sql_stmt := 'insert into '||p_destination_table||
                     '('||P_SELECT_LIST||') '||' select '||P_SELECT_LIST||
                     ' from '||P_SOURCE_TABLE||' '||P_WHERE_CLAUSE;