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  

Crosstab query?



 
 
Thread Tools Display Modes
  #1  
Old June 26th, 2008, 09:15 PM posted to microsoft.public.access.queries
Question Boy[_2_]
external usenet poster
 
Posts: 179
Default Crosstab query?

Hello I have 2 tables

1 Members
ID
FirstName
LastName

2. Stats
EntryDate
EntryType
ID -- From the Members Table
RefType
Amount

What I need help to do is create a query that give me the summary (count)
for each ID for Each type of EntryType (B, G, R). I can do this using
several queries but would like to know how this can be consolidated into one.

Thank you,

QB


  #2  
Old June 26th, 2008, 10:06 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Crosstab query?

Try this --
TRANSFORM Count(Stats.EntryType) AS CountOfEntryType
SELECT [FirstName] & " " & [LastName] AS Name, Count(Stats.EntryType) AS
[Total Entries]
FROM Members INNER JOIN Stats ON Members.ID = Stats.ID
GROUP BY [FirstName] & " " & [LastName]
PIVOT Stats.EntryType;

--
KARL DEWEY
Build a little - Test a little


"Question Boy" wrote:

Hello I have 2 tables

1 Members
ID
FirstName
LastName

2. Stats
EntryDate
EntryType
ID -- From the Members Table
RefType
Amount

What I need help to do is create a query that give me the summary (count)
for each ID for Each type of EntryType (B, G, R). I can do this using
several queries but would like to know how this can be consolidated into one.

Thank you,

QB


 




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


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


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