Crosstab query

R

rama

Hello
I am looking for some help to finish my access report.
In my access database I got table called tblJobs. There are some
fields - Date, Job, Priority etc. Each Job will have a Priority and it
can be 'A' or 'B' or 'C'. In my date wise report I wanted to summaries
the Priority like how many A, How many B, How many C etc. For that I
run a Crosstab query and the query runs fine. But now I am unable to
pull this single row data from Crosstab query to my report. Or is
there some other way to summaries the priority to a single line.
Rama
 
K

KARL DEWEY

This should do it. Add more fields for the rest of your priorities.
SELECT Sum(IIF([Priority]="A",1,0)) AS [Priority A],
Sum(IIF([Priority]="B",1,0)) AS [Priority B],
Sum(IIF([Priority]="C",1,0)) AS [Priority C]
FROM [tblJobs];

Add criteria as needed.
 
R

rama

This should do it.  Add more fields for the rest of your priorities.
SELECT Sum(IIF([Priority]="A",1,0)) AS [Priority A],
Sum(IIF([Priority]="B",1,0)) AS [Priority B],
Sum(IIF([Priority]="C",1,0)) AS [Priority C]
FROM [tblJobs];

Add criteria as needed.
--
KARL DEWEY
Build a little - Test a little



rama said:
Hello
I am looking for some help to finish my access report.
In my access database I got table called tblJobs. There are some
fields - Date, Job, Priority etc. Each Job will have a Priority and it
can be 'A' or 'B' or 'C'. In my date wise report I wanted to summaries
the Priority like how many A, How many B, How many C etc. For that I
run a Crosstab query and the query runs fine. But now I am unable to
pull this single row data from Crosstab query to my report. Or is
there some other way to summaries the priority to a single line.
Rama- Hide quoted text -

- Show quoted text -

Thanks a lot for the help. Exactly this is what I was trying for.
Rama.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top