J
Jeremy Noland
Here is the SQL code :
TRANSFORM Count([Background_Table].[Sex]) AS CountOfSex
SELECT [Background_Table].[Sex], [Training_Table].
[Training_Type]
FROM Background_Table, Training_Table
WHERE ((([Background_Table].[Sex])="M" Or
([Background_Table].[Sex])="F") And (([Training_Table].
[First_Name] & [Training_Table].[Last_Name])=
[Background_Table].[First_Name] & [Background_Table].
[Last_Name]))
GROUP BY [Background_Table].[Sex], [Training_Table].
[Training_Type]
ORDER BY [Training_Table].[Training_Type],
[Background_Table].[Country]
PIVOT [Background_Table].[Country];
Training_Type is a group:
MSPH, MPH, DrPH, Post Docs, Lab-Training, Distance
Learning, Mentoring, and Course
Sex is of course either Male or Female ('M' or 'F').
First of all, the Tables do not have any Lab-Training
Types as of yet : but here is what I need -
Combine MSPH and MPH Count M
Combine MSPH and MPH Count F
....
Combine Lab-Training, Distance Learning, Mentoring, and
Course Count M and another for F (all of these as Short-
Term)
And Then need it to come out in a nice Excel type Report
that looks somewhat like this :
COUNTRY MS/MPH DrPH Short-Term
Male Female Male Female Male Female
Bangladesh 1 0 1 1 4 5
China 0 0 0 0 2 1
India 3 1 1 0 8 2
....
HELP!
TRANSFORM Count([Background_Table].[Sex]) AS CountOfSex
SELECT [Background_Table].[Sex], [Training_Table].
[Training_Type]
FROM Background_Table, Training_Table
WHERE ((([Background_Table].[Sex])="M" Or
([Background_Table].[Sex])="F") And (([Training_Table].
[First_Name] & [Training_Table].[Last_Name])=
[Background_Table].[First_Name] & [Background_Table].
[Last_Name]))
GROUP BY [Background_Table].[Sex], [Training_Table].
[Training_Type]
ORDER BY [Training_Table].[Training_Type],
[Background_Table].[Country]
PIVOT [Background_Table].[Country];
Training_Type is a group:
MSPH, MPH, DrPH, Post Docs, Lab-Training, Distance
Learning, Mentoring, and Course
Sex is of course either Male or Female ('M' or 'F').
First of all, the Tables do not have any Lab-Training
Types as of yet : but here is what I need -
Combine MSPH and MPH Count M
Combine MSPH and MPH Count F
....
Combine Lab-Training, Distance Learning, Mentoring, and
Course Count M and another for F (all of these as Short-
Term)
And Then need it to come out in a nice Excel type Report
that looks somewhat like this :
COUNTRY MS/MPH DrPH Short-Term
Male Female Male Female Male Female
Bangladesh 1 0 1 1 4 5
China 0 0 0 0 2 1
India 3 1 1 0 8 2
....
HELP!