Skip to Main Content

SQL & PL/SQL

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!

How to split monthly quantity into Weeks not divide

2674976Sep 5 2014 — edited Sep 8 2014

Hi I am developing a Quarterly report where there will be 13 weeks in a quarter (always) and need to display quantities against that 13 weeks.

First Month has  4 weeks, 2nd month has 4 weeks and 3 month has 5 weeks all the time. I have a Data dimension table which will tell me the Week number (Col1) and the Month number (col2) that week belongs to....

My problem is I have Quantities aggregated at month level in the table. I have split these monthly quantities into Weekly Quantities.

My data:

 

Bucket DataQuantities
2/1/201415
3/1/20145
4/1/20144

   Desired Output:

  

MonthWeekQuantities
2/1/201414
2/1/201424
2/1/201434
2/1/201443
3/1/201452
3/1/201461
3/1/201471
3/1/201481
4/1/201491
4/1/2014101
4/1/2014111
4/1/2014121
4/1/2014130

Thanks

This post has been answered by RajenB on Sep 7 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2014
Added on Sep 5 2014
4 comments
1,762 views