A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query or queries



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 10:42 PM
Dan
external usenet poster
 
Posts: n/a
Default Query or queries

I have a query based on two tables. One table has ID
number, point, and a Code field with either an X or a C.
the other table has ID, Name etc. I have created a query
that sums the points. I also want to see the amount of
points for the X's and the C's.

I am not sure how to do this in a single query. I can
break them out with a count but not sure where to go from
there.

If I create 3 queries and query the queries it does
a "trickle down" 15 ID's and only report 7. Not sure how
to correct this.

Which is the better way and what am I missing to make this
work??
  #2  
Old July 9th, 2004, 01:19 AM
Ken Snell
external usenet poster
 
Posts: n/a
Default Query or queries

Try this:

SELECT [ID Number], Sum([Point]) AS SumOfPoints,
Count(Abs([Point]="X")) AS CountOfXPoints,
Count(Abs([Point]="C")) AS CountOfCPoints
FROM FirstListedTableInYourPost
GROUP BY [ID Number];


--

Ken Snell
MS ACCESS MVP

"Dan" wrote in message
...
I have a query based on two tables. One table has ID
number, point, and a Code field with either an X or a C.
the other table has ID, Name etc. I have created a query
that sums the points. I also want to see the amount of
points for the X's and the C's.

I am not sure how to do this in a single query. I can
break them out with a count but not sure where to go from
there.

If I create 3 queries and query the queries it does
a "trickle down" 15 ID's and only report 7. Not sure how
to correct this.

Which is the better way and what am I missing to make this
work??



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
query wizard error Christen General Discussion 12 August 13th, 2004 08:37 PM
Hidden files in Ms-Query cause ODBC connect errors or Query is wac needyourhelp General Discussion 4 July 12th, 2004 09:38 PM
Queries in a Dropdown Graham R Seach General Discussion 0 June 4th, 2004 12:15 AM
query field reference help -dch Running & Setting Up Queries 4 June 2nd, 2004 07:30 PM
Queries painfully slow, some general pointers please? Graham R Seach New Users 0 June 1st, 2004 05:19 AM


All times are GMT +1. The time now is 02:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.