Change Quarters to Months
592960Jul 29 2009 — edited Aug 4 2009Hello all,
Alright so I'm trying to change the quarters, to a set of twelve months.
I have data that looks like...
Date--------col2------col3---amount
2009Q1------22------33------100
2009Q2------55------66------200
...
I'm doing a substr and case to turn 2009Q1 into JAN-09 and so on for the other quarters. What I need to do is also create rows for the other months in the quarter, not just the first one.
So, using the example above, I need the data to look like this...
Date--------col2------col3---amount
JAN-09------22------33------100
FEB-09------22------33------0
MAR-09------22------33------0
APR-09------55------66------200
MAY-09------55------66------0
JUN-09------55------66------0
...
Q1 has been transformed into Jan/Feb/Mar and the amount only stays in the first month. The following 2 months should get a 0 for the amount.
Any help is appreciated!
Thanks
-Chris