Crosstab query

  • Thread starter Thread starter rama
  • Start date Start date
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
 
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.
 
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.
 
Back
Top