DBA Data[Home] [Help]

APPS.AZ_COMP_REPORTER SQL Statements

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

Line: 24

        
      
      
        
      
      
        
          
        
      
      
      
    

';
Line: 49

        
      
      
        
      
      
        
          
        
      
      
      
      
    

';
Line: 84

  PROCEDURE update_for_show_only_diff(p_request_id IN NUMBER,   p_source IN VARCHAR2);
Line: 90

  PROCEDURE update_diff_type_counts(p_request_id IN NUMBER,   p_source IN VARCHAR2);
Line: 110

    SELECT name,
      display_name,
      hashcode_details
    INTO v_am_name_a,
      v_am_disp_name_a,
      v_hcd_a
    FROM az_reporter_data
    WHERE request_id = p_request_id
     AND source = p_source
     AND id = 1
     AND type = -1
     AND is_primary = 'Y';
Line: 125

    INSERT
    INTO az_diff_results(name,   display_name,   request_id,   source,   type,   id,   parent_id,   hashcode_details,   depth,   is_different,   is_transformed,   show_only_diff,   param2,   attr_diff)
    VALUES(v_am_name_a,   -- name
    v_am_disp_name_a,   p_request_id,   p_source,   -1,   -- type
    v_results_id,   0,   -- parent_id
    v_hcd_a,   1,   -- depth
    'N',   -- isdifferent
    'N',   -- istransformed
    'N',   -- show_only_diff
    'Y',   -- exclude details for AM
    NULL);
Line: 139

      fnd_log.string(fnd_log.level_statement,   c_log_head || l_api_name || to_char(systimestamp),   'Inserting into az_diff_results for request_id: '
      || p_request_id || ' source: ' || p_source);
Line: 146

    UPDATE az_reporter_data
    SET deleted_flag = 'Y'
    WHERE request_id = p_request_id
     AND source = p_source
     AND id = 1
     AND is_primary = 'N';
Line: 171

    update_for_show_only_diff(p_request_id,   p_source);
Line: 173

    update_diff_type_counts(p_request_id,   p_source);
Line: 216

    SELECT name,
      display_name,
      id,
      hashcode,
      hashcode_details bulk collect
    INTO v_children_a_name_list,
      v_children_a_disp_name_list,
      v_children_a_id_list,
      v_children_a_hc_list,
      v_children_a_hcd_list
    FROM az_reporter_data
    WHERE request_id = p_request_id
     AND source = p_source
     AND parent_id = p_data_pid_a
     AND is_primary = 'Y';
Line: 237

          SELECT id
          INTO v_matching_vo_id_b
          FROM az_reporter_data
          WHERE request_id = p_request_id
           AND source = p_source
           AND hashcode = v_children_a_hc_list(i)
           AND parent_id = p_data_pid_b
           AND is_primary = 'N'
           AND deleted_flag = 'N'
           AND rownum = 1;
Line: 248

          UPDATE az_reporter_data
          SET deleted_flag = 'Y'
          WHERE request_id = p_request_id
           AND source = p_source
           AND id = v_matching_vo_id_b
           AND is_primary = 'N';
Line: 268

            SELECT xmlquery('for $a in 1
              let $common := for $i in $PRIM/H/V, $j in $SEC/H/V
                       where ($i/@N eq $j/@N)
                       return
                            if ($i/@U = "Y")
                            then {($i/A)}{($j/B)}
                            else {($i/A)}{($j/B)}
              let $exsec := for $j in $SEC/H/V
                          return
                            if (some $i in $common satisfies $i/@N = $j/@N)
                            then ""
                            else  $j
              let $exprim := for $j in $PRIM/H/V
                          return
                          if (some $i in $common satisfies $i/@N = $j/@N)
                            then ""
                          else $j
               return {$common}{$exprim}{$exsec}' passing
            PRIM.attributes as "PRIM", SEC.attributes as "SEC"
            returning content).createSchemaBasedXml(DIFF_SCHEMA_URL)
            into v_temp_xmltype
			from az_reporter_data PRIM,az_reporter_data SEC
            where PRIM.request_id = SEC.request_id
            and PRIM.source = SEC.source
            and PRIM.request_id = p_request_id
			and PRIM.source = p_source
            and PRIM.id=v_children_A_ID_List(i)
			and PRIM.is_primary='Y'
            and SEC.id = v_matching_VO_id_B
            and SEC.is_primary = 'N';
Line: 300

           select decode(existsNode(v_temp_xmltype,'/H/V[((not(./A/text()!="") and ./B/text()!="") or (not(./B/text()!="") and ./A/text()!="") or (./A/text()!=./B/text())) and not(@U="Y")]'),1,'C','N')
           INTO v_is_different
          FROM dual;
Line: 304

          SELECT existsnode(v_temp_xmltype,   '/H/V[not(@U="Y")]')
          INTO v_exclude_details_temp
          FROM dual;
Line: 330

          INSERT
          INTO az_diff_results(name,   display_name,   request_id,   source,   type,   id,   parent_id,   hashcode_details,   depth,   is_different,   is_transformed,   show_only_diff,   param2,   attr_diff)
          VALUES(v_children_a_name_list(i),   v_children_a_disp_name_list(i),   p_request_id,   p_source,   v_type,   p_results_id,   p_results_pid,   v_children_a_hcd_list(i),   p_depth,   -- depth
          v_is_different,   -- isdifferent
          'N',   -- istransformed
          decode(v_is_different,   'C',   'Y',   'N'),   --show only diff--v_show_only_diff, -- show_only_diff
          v_exclude_details,   v_temp_xmltype);
Line: 363

          raise_error_msg(SQLCODE,   sqlerrm,   'output_DF',   'get matching VO of B, collect attributes and insert');
Line: 372

    SELECT id bulk collect
    INTO v_children_b_id_list
    FROM az_reporter_data
    WHERE request_id = p_request_id
     AND source = p_source
     AND parent_id = p_data_pid_b
     AND is_primary = 'N'
     AND deleted_flag = 'N';
Line: 429

      SELECT name,
        display_name,
        id,
        hashcode,
        hashcode_details
      INTO v_name_a,
        v_disp_name_a,
        v_id_a,
        v_hc_a,
        v_hcd_a
      FROM az_reporter_data
      WHERE request_id = p_request_id
       AND source = p_source
       AND id = p_data_id
       AND is_primary = 'Y';
Line: 445

      SELECT d.attributes.transform(v_a_xmltype)
      INTO v_temp_xmltype
      FROM az_reporter_data d
      WHERE request_id = p_request_id
       AND source = p_source
       AND id = p_data_id
       AND is_primary = 'Y';
Line: 453

      SELECT existsnode(v_temp_xmltype,   '/H/V[not(@U="Y")]')
      INTO v_exclude_details_temp
      FROM dual;
Line: 478

      INSERT
      INTO az_diff_results(name,   display_name,   request_id,   source,   type,   id,   parent_id,   hashcode_details,   depth,   is_different,   is_transformed,   show_only_diff,   param2,   attr_diff)
      VALUES(v_name_a,   v_disp_name_a,   p_request_id,   p_source,   v_type,   p_results_id,   p_results_pid,   v_hcd_a,   p_depth,   -- depth
      'A',   -- isdifferent
      'N',   -- istransformed
      'Y',   -- show_diff_only
      v_exclude_details,   xmltype(v_temp_xmltype.getclobval(),   diff_schema_url,   1,   1));
Line: 493

      SELECT id bulk collect
      INTO v_children_a_id_list
      FROM az_reporter_data
      WHERE request_id = p_request_id
       AND source = p_source
       AND parent_id = p_data_id
       AND is_primary = 'Y';
Line: 547

      SELECT name,
        display_name,
        id,
        hashcode,
        hashcode_details
      INTO v_name_b,
        v_disp_name_b,
        v_id_b,
        v_hc_b,
        v_hcd_b
      FROM az_reporter_data
      WHERE request_id = p_request_id
       AND source = p_source
       AND id = p_data_id
       AND is_primary = 'N';
Line: 563

      SELECT d.attributes.transform(v_b_xmltype)
      INTO v_temp_xmltype
      FROM az_reporter_data d
      WHERE request_id = p_request_id
       AND source = p_source
       AND id = p_data_id
       AND is_primary = 'N';
Line: 571

      SELECT existsnode(v_temp_xmltype,   '/H/V[not(@U="Y")]')
      INTO v_exclude_details_temp
      FROM dual;
Line: 597

      INSERT
      INTO az_diff_results(name,   display_name,   request_id,   source,   type,   id,   parent_id,   hashcode_details,   depth,   is_different,   is_transformed,   show_only_diff,   param2,   attr_diff)
      VALUES(v_name_b,   v_disp_name_b,   p_request_id,   p_source,   v_type,   p_results_id,   p_results_pid,   v_hcd_b,   p_depth,   -- depth
      'B',   -- isdifferent
      'N',   -- istransformed
      'Y',   -- show_diff_only
      v_exclude_details,   xmltype(v_temp_xmltype.getclobval(),   diff_schema_url,   1,   1));
Line: 608

      UPDATE az_reporter_data
      SET deleted_flag = 'Y'
      WHERE request_id = p_request_id
       AND source = p_source
       AND id = v_id_b
       AND is_primary = 'N';
Line: 622

      SELECT id bulk collect
      INTO v_children_b_id_list
      FROM az_reporter_data
      WHERE request_id = p_request_id
       AND source = p_source
       AND parent_id = p_data_id
       AND is_primary = 'N'
       AND deleted_flag = 'N';
Line: 647

    PROCEDURE update_for_show_only_diff(p_request_id IN NUMBER,   p_source IN VARCHAR2) IS

    v_different_id_list typ_nest_tab_number;
Line: 655

    l_api_name constant VARCHAR2(30) := 'update_for_show_only_diff : ';
Line: 657

      SELECT id,
        parent_id bulk collect
      INTO v_different_id_list,
        v_different_pid_list
      FROM az_diff_results
      WHERE request_id = p_request_id
       AND source = p_source
       AND is_different <> 'N' -- gets you A, B or C
      ORDER BY depth;
Line: 678

            SELECT parent_id,
              is_different,
              show_only_diff
            INTO v_parent_id,
              v_is_different,
              v_show_only_diff
            FROM az_diff_results
            WHERE request_id = p_request_id
             AND source = p_source
             AND id = v_id;
Line: 703

              UPDATE az_diff_results
              SET show_only_diff = 'Y',
                is_different = 'D'
              WHERE request_id = p_request_id
               AND source = p_source
               AND id = v_id;
Line: 720

            raise_error_msg(SQLCODE,   sqlerrm,   'update_for_show_only_diff',   'select show_only_diff column of parents');
Line: 734

      raise_error_msg(SQLCODE,   sqlerrm,   'update_for_show_only_diff',   'procedure end');
Line: 736

    END update_for_show_only_diff;
Line: 778

    PROCEDURE update_diff_type_counts(p_request_id IN NUMBER,   p_source IN VARCHAR2) IS

    v_diff_type_list typ_nest_tab_varchar;
Line: 783

    l_api_name constant VARCHAR2(40) := 'update_diff_type_counts : ';
Line: 787

        fnd_log.string(fnd_log.level_statement,   c_log_head || l_api_name || to_char(systimestamp),   'update_diff_type_counts called with p_request_id: ' || p_request_id || ' p_source: ' || p_source);
Line: 790

      SELECT nvl(COUNT,   0),
        e.column_value.getrootelement() AS
      col_name bulk collect
      INTO v_diff_count_list,
        v_diff_type_list
      FROM
        (SELECT decode(is_different,    'A',    'P6',    'B',    'P7',    'C',    'P8',    'D',    'P8',    'N',    'P9') name,
           COUNT(is_different) COUNT
         FROM az_diff_results d
         WHERE request_id = p_request_id
         AND source = p_source
         AND parent_id = 1
         GROUP BY is_different)
      k,
        TABLE(xmlsequence(EXTRACT(xmltype(''),   '/Root/node()'))) e
      WHERE e.column_value.getrootelement() = name(+);
Line: 814

                       
                       
                       

	  ';
Line: 826

                  
                    
                  
              
              
              
              
              
                  ' || v_transform_xml || '
                    
                    
                  
             
             
			 
			';
Line: 845

		  to_char(systimestamp),   'Query to update selection set with counts : update az_requests d set 	d.selection_set = d.selection_set.transform(xmltype(''' ||
		  v_transform_xml || ''')).createSchemabasedxml(d.selection_set.getSchemaURL()) WHERE request_id=' || p_request_id || ' and request_type=''C''');
Line: 849

        EXECUTE IMMEDIATE 'update az_requests d set d.selection_set = d.selection_set.transform(xmltype(''' || v_transform_xml || ''')).createSchemabasedxml(d.selection_set.getSchemaURL()) WHERE request_id=' || p_request_id || ' and request_type=''C''';
Line: 859

      raise_error_msg(SQLCODE,   sqlerrm,   'update_diff_type_counts',   'Error while updating the count based on type of differences');
Line: 861

    END update_diff_type_counts;