I seem to have a continuous problem with this. I have a table with ALL possible dates (They are actually all Week Ending Saturday Dates.)
I have another table with actual data and the Week Ending Saturday Date associated with that piece of data.
My query is a joining query that uses ALL of the possible dates. However it does not seem to be doing that. There are weeks missing. I have my SQL below
SELECT Count(NZ(B_ClosedByWeek_CARs_Tbl.CAR_Num_Full,0)) AS Closed, CAR_Possible_WEDATES_W_Leaps_tbl.PossibleWeekEndingDates AS Week INTO C3_ClosedbyWeek_KOJ_Time_Line_Count_tbl
FROM B_ClosedByWeek_CARs_Tbl RIGHT JOIN CAR_Possible_WEDATES_W_Leaps_tbl ON B_ClosedByWeek_CARs_Tbl.WEDate = CAR_Possible_WEDATES_W_Leaps_tbl.PossibleWeekEndingDates
WHERE (((B_ClosedByWeek_CARs_Tbl.Problem_Location)="KOJ Cherry St" Or (B_ClosedByWeek_CARs_Tbl.Problem_Location)="KOJ Panel Plant" Or (B_ClosedByWeek_CARs_Tbl.Problem_Location)="KOJ Wood Plant") AND ((B_ClosedByWeek_CARs_Tbl.WEDate)<Now() And (B_ClosedByWeek_CARs_Tbl.WEDate)>#5/31/2010#))
GROUP BY CAR_Possible_WEDATES_W_Leaps_tbl.PossibleWeekEndingDates
ORDER BY CAR_Possible_WEDATES_W_Leaps_tbl.PossibleWeekEndingDates;