How to use a loop?

  • Thread starter Thread starter noclue?
  • Start date Start date
N

noclue?

How to use a loop?

I had problem querying the number of yes or no, to a table?

I need to display a table based from the 3 fields from a
table(branchinfo). Say 'area','team' and 'QC'.
QC is the yes or no option.

How can I dislay the table showing like 'area' on x-axis,
and 'team' on y-axis and the count of 'QC' as the
data


eg
districtA districtB districtC districtD
team A 4 3 1 1
team B 2 1 2 3
team C 1 4 3 1
...
...
...


..
 
Did you try a crosstab query?

TRANSFORM Abs(Sum([QC])) As YesCount
SELECT team
FROM branchinfo
GROUP BY team
PIVOT area

TRANSFORM Abs(Sum([QC]=0)) As NoCount
SELECT team
FROM branchinfo
GROUP BY team
PIVOT area
 

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

How to display? 1
Update query? 3
quick query question 3
Comparing Dates in rows/records 1
query to get top player 8
Football Fixtures 5
I need help on a query. 6
getting players records vs. other players 5

Back
Top