Pivot on weekday
Posted on 2008-11-17
The query belows works but needs some help. I need this such that I can generate a report that prints M - F across the top and places the control OnTimeScrap under the appropriate day. I've tried transform and pivot but I could never gert the syntex correct, if it is even the right way to go.
SELECT tblSupervisorReporting.ProductionDate, tblLineSupervisors.SurpevisorLN, tblLineCode.LineCodeDescription, tblLineSupervisors.Shift, tblSupervisorReporting.OnTimeScrap
FROM tblShift INNER JOIN (tblLineCode INNER JOIN (tblLineSupervisors INNER JOIN tblSupervisorReporting ON tblLineSupervisors.SupervisorID = tblSupervisorReporting.SupervisorID) ON tblLineCode.LineCodeID = tblLineSupervisors.LineCodeID) ON tblShift.ShiftID = tblLineSupervisors.Shift
WHERE (((tblSupervisorReporting.ProductionDate) Between [Enter Beginning Date] And [Enter Ending Date]) AND ((tblLineSupervisors.Active)=Yes));