I want to display the week number for every year starting with 2013 and going forward. I have an Order Detail table that contains the following:
OrderNbr, RequestedShipDate, Item, Quantity
I'm trying to create a sql view that will have the following:
Item, Quantity, WeekNbr, Year1
My Order Detail table only has records in it for a few weeks but I want to see every week in the year and then in my quantity field I will fill it with 0 when there is not an order for that week/year combination.
So the result set would look something like this:
Item, Quantity, WeekNbr, Year1
ABC, 0, 1, 2014
ABC, 0, 2, 2014
ABC, 8, 3, 2014
and so on.