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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |