G
Guest
I am a newbie at crosstabs and have question on either combining multiple crosstabs or a "super" crosstab. I have looked at Duane Hookoms advice on the query and the cartesian idea and think that is what I need but can't seem to understand it
My data table has a Landowner Type field and 10 fields (named BMP_1 ... BMP_10) each BMP* field has one of 4 "criteria" type answers ("meets", "exceeds", "minor", "major" ).
I can do a xtab on each field and sum a count of each criteria, with this sql (I now have 10 xtabs
TRANSFORM Count(BMP_Table.Insp_ID_PK) AS CountOfInsp_ID_P
SELECT BMP_Table.[Landowner Type], Count(BMP_Table.Insp_ID_PK) AS Tota
FROM BMP_Tabl
GROUP BY BMP_Table.[Landowner Type
PIVOT BMP_Table.[BMP_5]
and what I get is something like this (for each of the 10 BMP queries)
BMP_
LandownerType Meets Exceeds Minor Major Tota
-------------------------------------------------------------------------------
Industrial 1 3 5 1 10
TIMO 3 4 2 2 11
NIPFL 1 6 3 0 1
State 5 4 1 0 1
This makes it awkward for reporting and other things and What I want is one query withall landowner types and all bmp* fields accompanied by the total count across each criteria like
Landowner Meets Exceeds Minor Major Tota
------------------------------------------------------
Industrial BMP_1 3 5 5 1 1
Industrial BMP_2 5 4 1 0 1
Industrial BMP_3 6 1 1 0
Industrial BMP_4 1 7 3 2 1
.................................
State BMP_8 3 5 5 1 1
State BMP_9 5 4 1 0 10
State BMP_10 6 1 1 0
Perhaps someone can point me in the right direction
Many thanks, Steve
My data table has a Landowner Type field and 10 fields (named BMP_1 ... BMP_10) each BMP* field has one of 4 "criteria" type answers ("meets", "exceeds", "minor", "major" ).
I can do a xtab on each field and sum a count of each criteria, with this sql (I now have 10 xtabs
TRANSFORM Count(BMP_Table.Insp_ID_PK) AS CountOfInsp_ID_P
SELECT BMP_Table.[Landowner Type], Count(BMP_Table.Insp_ID_PK) AS Tota
FROM BMP_Tabl
GROUP BY BMP_Table.[Landowner Type
PIVOT BMP_Table.[BMP_5]
and what I get is something like this (for each of the 10 BMP queries)
BMP_
LandownerType Meets Exceeds Minor Major Tota
-------------------------------------------------------------------------------
Industrial 1 3 5 1 10
TIMO 3 4 2 2 11
NIPFL 1 6 3 0 1
State 5 4 1 0 1
This makes it awkward for reporting and other things and What I want is one query withall landowner types and all bmp* fields accompanied by the total count across each criteria like
Landowner Meets Exceeds Minor Major Tota
------------------------------------------------------
Industrial BMP_1 3 5 5 1 1
Industrial BMP_2 5 4 1 0 1
Industrial BMP_3 6 1 1 0
Industrial BMP_4 1 7 3 2 1
.................................
State BMP_8 3 5 5 1 1
State BMP_9 5 4 1 0 10
State BMP_10 6 1 1 0
Perhaps someone can point me in the right direction
Many thanks, Steve