I have two tables, ProblemChildren and DailyTable. ProblemChildren consists of an ID and a name. DailyTable consists of a ID, name, and date_hit.
Right now, I'm displaying all ProblemChildren.name where it exists in DailyTable. So if the name "Mike" in ProblemChildren does not have a record in DailyTable, then his name is not outputted.
Again right now, it's diplaying the ProblemChildren.name and the sum of amount times the name can be found in DailyTable. If "Mike" is not found within DailyTable, from ProblemChildren.name, then I still want the output to reflect "Mike" as 0.
How can I do this?
TRANSFORM Sum(DT.[Page Views]) AS [SumOfPage Views]
SELECT PC.CA_NTID AS ntid, PC.CA_Name
FROM tbl_ProblemChildren AS PC
LEFT JOIN [Daily Table] DT
ON DT.ntid = PC.CA_NTID
WHERE DT.[report date] > #6/1/2010#
GROUP BY PC.CA_NTID, PC.CA_Name
PIVOT DT.[report date];