I have this sql which allows me to have 52 weeks populated whether there is any data or not
TRANSFORM Count(KG_LC_EnglishWL18wkPTLOutputQry.UnitNo) AS CountOfUnitNo
SELECT KG_LC_EnglishWL18wkPTLOutputQry.Specialty
FROM KG_LC_EnglishWL18wkPTLOutputQry
WHERE (((KG_LC_EnglishWL18wkPTLOutputQry.Specialty) In ("BREAST","COLOREC","ENT","GASTRO","GYNA","OPHT","ORAL","ORTH","PAIN","PLAS","SURG","UROL","VASC")) AND ((KG_LC_EnglishWL18wkPTLOutputQry.Planned)="Active") AND ((KG_LC_EnglishWL18wkPTLOutputQry.[Eng/Wel])="English") AND ((KG_LC_EnglishWL18wkPTLOutputQry.[P'wayLoc'])="IP"))
GROUP BY KG_LC_EnglishWL18wkPTLOutputQry.Specialty, KG_LC_EnglishWL18wkPTLOutputQry.[P'wayLoc']
PIVOT (IIf([RTTWeeks]>=52,52,[RTTWeeks])) In (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52);
i have something completely different i am doing but i want my dates populated just like the weeks were able to above. but i dont want it as a pivot (whether that is possible because i need columns for session start and finish times and actual start and finish times and utilisation and i need to plot graphs from this data.
so i need to enter a date into the dataset but with no columns populated as nothing happened that day?
Thanks for any help
liz x
TRANSFORM Count(KG_LC_EnglishWL18wkPTLOutputQry.UnitNo) AS CountOfUnitNo
SELECT KG_LC_EnglishWL18wkPTLOutputQry.Specialty
FROM KG_LC_EnglishWL18wkPTLOutputQry
WHERE (((KG_LC_EnglishWL18wkPTLOutputQry.Specialty) In ("BREAST","COLOREC","ENT","GASTRO","GYNA","OPHT","ORAL","ORTH","PAIN","PLAS","SURG","UROL","VASC")) AND ((KG_LC_EnglishWL18wkPTLOutputQry.Planned)="Active") AND ((KG_LC_EnglishWL18wkPTLOutputQry.[Eng/Wel])="English") AND ((KG_LC_EnglishWL18wkPTLOutputQry.[P'wayLoc'])="IP"))
GROUP BY KG_LC_EnglishWL18wkPTLOutputQry.Specialty, KG_LC_EnglishWL18wkPTLOutputQry.[P'wayLoc']
PIVOT (IIf([RTTWeeks]>=52,52,[RTTWeeks])) In (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52);
i have something completely different i am doing but i want my dates populated just like the weeks were able to above. but i dont want it as a pivot (whether that is possible because i need columns for session start and finish times and actual start and finish times and utilisation and i need to plot graphs from this data.
so i need to enter a date into the dataset but with no columns populated as nothing happened that day?
Thanks for any help
liz x