Robin-
Then Sum(Visitors) should give the sum of all the values in the Visitors column
in all the rows. Why do you think the answer is wrong?
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Robin Chapple
Sent: Sunday, October 23, 2011 12:55 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Sum function in a query
Thanks again John,
"StatsYTD" is a table. It has the same number of records as the query
and there are no obvious duplications.
Regards,
Robin
At 23/10/2011 07:44 PM, you wrote:
>Robin-
>
>Is StatsYTD a table or a query? When you look at the datasheet of
>that, what do
>you see in Visitors?
>
>John Viescas, author
>Microsoft Office Access 2010 Inside Out
>Microsoft Office Access 2007 Inside Out
>Building Microsoft Access Applications
>Microsoft Office Access 2003 Inside Out
>SQL Queries for Mere Mortals
>http://www.viescas.com/
>(Paris, France)
>
>
>
>-----Original Message-----
>From: MS_Access_Professionals@yahoogroups.com
>[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Robin Chapple
>Sent: Sunday, October 23, 2011 10:30 AM
>To: MS_Access_Professionals@yahoogroups.com
>Subject: RE: [MS_AccessPros] Sum function in a query
>
>
>Thanks John,
>
>The SQL for "qStatsYTD":
>
>SELECT StatsYTD.StatsID, StatsYTD.Page, StatsYTD.Visitors
>FROM StatsYTD;
>
>and there are no obvious duplications when I sort the result.
>
>Cheers,
>
>Robin
>
>At 23/10/2011 04:23 PM, you wrote:
> >Robin-
> >
> >What does qStatsYTD look like? I bet it is returning duplicate rows.
> >
> >John Viescas, author
> >Microsoft Office Access 2010 Inside Out
> >Microsoft Office Access 2007 Inside Out
> >Building Microsoft Access Applications
> >Microsoft Office Access 2003 Inside Out
> >SQL Queries for Mere Mortals
> >http://www.viescas.com/
> >(Paris, France)
> >
> >
> >-----Original Message-----
> >From: MS_Access_Professionals@yahoogroups.com
> >[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Robin Chapple
> >Sent: Sunday, October 23, 2011 12:52 AM
> >To: MS_Access_Professionals@yahoogroups.com
> >Subject: [MS_AccessPros] Sum function in a query
> >
> >I have a database with records to our web site counted per page. I am
> >planning to report on separate folders. I have prepared a query that
> >shows 1494 visitors to the pages in the /benalla/ folder.
> >
> >When I run this SQL:
> >
> >SELECT Sum([qStatsYTD/clubs/Benalla/].Visitors) AS SumOfVisitors
> >FROM [qStatsYTD/clubs/Benalla/];
> >
> >I get a sum of 5057.
> >
> >What I have done incorrectly?
> >
> >The results query that is counted is below.
> >
> >Many thanks,
> >
> >Robin Chapple
> >
> >
> >
> >StatsID Page
> >Visitors
> >80 Rotary Club of Benalla Home Page
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/)
> >470
> >277 About Rotary Club of Benalla
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/about.asp)
> >176
> >382 Rotary Club of Benalla Snippets From Club Bulletins
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/snippets.asp) 135
> >357 http://www.rotary9790.org.au/clubs/atoc/benalla/about.htm
> >134
> >539 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/juniorawards.asp)
> >106
> >723 Rotary Club of Benalla
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/legends.asp)
> >74
> >708 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/vanuatu.asp)
> >69
> >787 Rotary Club of Benalla
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/kellymcnamara.asp)
> >62
> >769 Rotary Club of Benalla
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/youth.asp)
> >62
> >911 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/salvos.asp)
> >49
> >1033 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/festival.asp)
> >42
> >1105 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/golfday.asp)
> >38
> >1190 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/benallarawcsteam.asp)
> >36
> >1254 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/bbqsep2010.asp)
> >32
> >2329 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/newmem.asp)
> >4
> >2321 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/balloons.asp)
> >3
> >3025 Rotary Club of Benalla - Vale Gerrard Crothers
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/valecrothers.asp)
> >1
> >3024 Rotary International District 9790
> >(http://www.rotary9790.org.au/clubs/atoc/benalla/board0910.asp)
> >1
> >
> >
> >
> >
> >------------------------------------
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >------------------------------------
> >
> >Yahoo! Groups Links
> >
> >
> >
>
>
>
>
>------------------------------------
>
>Yahoo! Groups Links
>
>
>
>
>
>------------------------------------
>
>Yahoo! Groups Links
>
>
>
------------------------------------
Yahoo! Groups Links
Minggu, 23 Oktober 2011
RE: [MS_AccessPros] Sum function in a query
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar