1 Reply Latest reply on Jun 18, 2014 9:13 PM by rp0428

    Multi Dimensional Arrays in PL/SQL

    8761012f-c8e7-43a5-96d4-2320c05573d0

      I am trying to create a report and format it as per the end of this question.

      I have an sql statement to select my records which is set up as cursor.

      The sample records will come in like this:

      DIVISIONQTR_PERIODAREATotal
      CN2014Q1DOM68,582
      CN2014Q1INT53,812
      CN2014Q2DOM47,403
      CN2014Q2INT52,692
      EN2014Q1DOM27,199
      EN2014Q1INT1,643
      EN2014Q2DOM25,460
      EN2014Q2INT

      935

       

      I'm trying to figure out how to set up a two-dimensional array and load this cursor into it.

      I know my qtr_period array will be 8 because I will do 4 quarters for 2 years

      and the other array will be DOM & INT for each qtr_period array.

      Any help on how to set this up the right way????

       

      2014Q2   2014Q1   2013Q4   
      DOM        INT   DOM       INT   DOM    INT
      CN   47403    52692   68582    53812   0           0
      EN   25460    935   27199    1643   0           0