jeudi 16 juin 2016

Need Help in Achieving the required Output

I have a requirement to convert Data from certain tables into a specific format. Could you please help me out achieve the desired output?

Below link contains an Excel Attachment which holds the following information: Google Drive Link

  1. Tab : Input-Output --> Contains the Structure of the Source and the Target Table
  2. Tab : Create Scripts --> Create scripts to create all the tables
  3. Tab : Insert Scripts --> Insert script to insert the data into the Source Tables

Edit (Code) which I tried:

TYPE subline_col_c_rectype IS RECORD
   (
ID_C    VARCHAR(75), 
Col_C1  VARCHAR(75), 
Col_C2 VARCHAR(75)

   );

   TYPE subline_col_c_tabtype IS TABLE OF subline_col_c_rectype
      INDEX BY BINARY_INTEGER;   


   TYPE line_rectype IS RECORD
   (

   ID_A VARCHAR(75), 
   Col_A1    VARCHAR(75), 
   Col_A2    VARCHAR(75), 
   Col_A3    VARCHAR(75), 
   Col_A4    VARCHAR(75), 
   Col_A5    VARCHAR(75), 
   ID_B  VARCHAR(75), 
   Col_B1    VARCHAR(75), 
   Col_B2    VARCHAR(75), 
   Col_B3    VARCHAR(75), 
   Col_B4    VARCHAR(75), 
    Col_B5 VARCHAR(75), 
    Col_C    subline_col_c_tabtype,
        Col_D    subline_col_c_tabtype
);

   TYPE line_tabtype IS TABLE OF line_rectype
      INDEX BY BINARY_INTEGER;

Was able to store the records in associative array line_tabtype but not sure how to expand the child records and store it in the target table.

Aucun commentaire:

Enregistrer un commentaire