February 14th, 2013, 01:42 PM
Help with a view and a possible 52 week table
I have a table which is indexed by WHSE + PRODUCT
There is another table which I need to look up which is keyed by YEAR (YYYY) +WEEK (01 - 52) + WHSE + PRODUCT.
The second table is sales by week but there does not have to be a record for every week, onlt the weeks that have sales.
So the second table may have week 04,05,12, and 50.
The output should be
WHSE PRODUCT YEAR WEEK01 WEEK02 WEEK03 WEEK04 .... WEEK52
Where Week 4,5,12 and 50 would have data all of the other columns would be null.
I have no Idea how to accomplish this.
The first table is ICWM the second TABLE is SAWP.
Thanks for any help you can give.
February 19th, 2013, 10:46 AM
and what database do you have?
if you found this post is useful click Give Rep button (bottom side on this reply ) and agree