Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multi Dimensional Arrays in PL/SQL

2696843Jun 18 2014 — edited Jun 18 2014

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
This post has been answered by unknown-7404 on Jun 18 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2014
Added on Jun 18 2014
1 comment
1,306 views