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:
DIVISION | QTR_PERIOD | AREA | Total |
CN | 2014Q1 | DOM | 68,582 |
CN | 2014Q1 | INT | 53,812 |
CN | 2014Q2 | DOM | 47,403 |
CN | 2014Q2 | INT | 52,692 |
EN | 2014Q1 | DOM | 27,199 |
EN | 2014Q1 | INT | 1,643 |
EN | 2014Q2 | DOM | 25,460 |
EN | 2014Q2 | INT | 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 |