Jumat, 08 Februari 2013

[MS_AccessPros] Mystery of missing records. Solved

 


I found some records with a null amount. Added 'Is Not Null' to the
query and they all returned.

Robin

~~~~~~~~~~~~~~~~~~~~~~~~Original Message ~~~~~~~~~~~~~~~~~

With help from Graham I have progressed my report.

I am now working on YTD totals and I am suffering with disappearing records.

This SQL , "ServiceProjectsYTD", gives me over 1,000 records from 41 clubs:

SELECT tClubs.ClubID, qServiceProjects.ServiceValue
FROM (qServiceProjects INNER JOIN tClubs ON qServiceProjects.ClubID =
tClubs.ClubID) INNER JOIN tReportMonth ON qServiceProjects.MonthID =
tReportMonth.ReportMonthID
ORDER BY tReportMonth.MonthDate DESC , tReportMonth.ReportMonthID;

When I attempt to sum the totals I see only two clubs:

SELECT ServiceProjectsYTD.ClubID,
Sum(ServiceProjectsYTD.ServiceValue) AS SumOfServiceValue
FROM ServiceProjectsYTD
GROUP BY ServiceProjectsYTD.ClubID;

They happen to be the only clubs with entries for February 2013 but
all clubs are in the first query!

What have I missed?

Many thanks,

Robin Chapple

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar