J
Jasonm
Good morning. I am running the following query:
SELECT MonthlyReport.MRDate, MillPond.SampleDate, MillPond.pH,
MillPond.TotalCl2, MillPond.TSS, MillPond.NTU, MillPond.Comments,
Format([sampledate],"yyyy") AS SampleYear, Format([sampledate],"m") AS
SampleMonth, MonthlyReport.BWFlow AS AVGBWFlow
FROM MonthlyReport RIGHT JOIN MillPond ON MonthlyReport.MRDate =
MillPond.SampleDate
GROUP BY MonthlyReport.MRDate, MillPond.SampleDate, MillPond.pH,
MillPond.TotalCl2, MillPond.TSS, MillPond.NTU, MillPond.Comments,
Format([sampledate],"yyyy"), Format([sampledate],"m"), MonthlyReport.BWFlow
HAVING (((Format([sampledate],"yyyy"))=["What CALENDAR year do you want to
run this report for?"]));
The table MonthlyReport has an entry for every day of the year while the
table MillPond has only one entry for each week (more or less).
I have set the query so that I should be getting ALL of the records from
MonthlyReport, and only the recrods from MillPond where the date fields are
equal. The query only retuns 51 records (the number of records in the
MillPond table for 2008). Should this be the case? Am I just misinterpreting
the way this query should work?
Are there any suggestions from the group on how to acomplish what I just
explained? Any assistance would be appreciated.
Jasonm
SELECT MonthlyReport.MRDate, MillPond.SampleDate, MillPond.pH,
MillPond.TotalCl2, MillPond.TSS, MillPond.NTU, MillPond.Comments,
Format([sampledate],"yyyy") AS SampleYear, Format([sampledate],"m") AS
SampleMonth, MonthlyReport.BWFlow AS AVGBWFlow
FROM MonthlyReport RIGHT JOIN MillPond ON MonthlyReport.MRDate =
MillPond.SampleDate
GROUP BY MonthlyReport.MRDate, MillPond.SampleDate, MillPond.pH,
MillPond.TotalCl2, MillPond.TSS, MillPond.NTU, MillPond.Comments,
Format([sampledate],"yyyy"), Format([sampledate],"m"), MonthlyReport.BWFlow
HAVING (((Format([sampledate],"yyyy"))=["What CALENDAR year do you want to
run this report for?"]));
The table MonthlyReport has an entry for every day of the year while the
table MillPond has only one entry for each week (more or less).
I have set the query so that I should be getting ALL of the records from
MonthlyReport, and only the recrods from MillPond where the date fields are
equal. The query only retuns 51 records (the number of records in the
MillPond table for 2008). Should this be the case? Am I just misinterpreting
the way this query should work?
Are there any suggestions from the group on how to acomplish what I just
explained? Any assistance would be appreciated.
Jasonm