Crosstab Query Help, I think...

lawtonl

Registered User.
Local time
Today, 02:37
Joined
Nov 3, 2009
Messages
28
Hello there,

I'm not even sure a cross tab query covers this. What I'm trying to do is create a query that will count how many companies I have in a particular catagory. I have decided those catgories by SIC codes and I have numerous columns along these lines that count how many within each catagory I have:

Code:
Media & Entertainment: Sum(IIf([SIC Code]>=22000 And [sic code]<23000 Or [SIC Code] Like '92*',1,0))
 
Manufacturing: Sum(IIf([SIC Code]>=15000 And [SIC Code]<=21999 Or [SIC Code]>=23000 And [SIC Code]<38000,1,0))

To take that one step further I want that broken down by our Customer service Depts which is in another table and I would like it to look something like this:

Code:
                 Media & Entertainment   Manufacturing
Corporate        20                         90
Business         15                          42
Customer        80                          0
Total             115                         132

I keep playing around with the queries but seem to be hitting a brick wall every time.

Any suggestions?

tia
 

Users who are viewing this thread

Back
Top Bottom