Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab with two tables

Status
Not open for further replies.

kupe

Technical User
Sep 23, 2002
376
This is my regular crosstab query, only now it is fed by two tables. Does this mean I have to make a join, please, Experts.

If it does mean a join, I'd be grateful to know where the join is declared.

TRANSFORM Count(qryEmployees.Roots) AS Ethnicity
SELECT qryEmpWorkers.DailyGrind
FROM qryEmployees, qryEmpWorkers
GROUP BY qryEmpWorkers.DailyGrind
PIVOT qryEmployees.Roots;

The key fields are qryEmployees.EmployeeID and qryEmpWorkers.EmployeeIDFK
 
Do you think this is the right way ... and would be accurate?

TRANSFORM Count(qryEmployees.Roots) AS Ethnicity
SELECT qryEmpWorkers.DailyGrind
FROM qryEmpWorkers
INNER JOIN qryEmployees
ON qryEmpWorkers.EmployeeIDFK = qryEmployees.EmployeeID
GROUP BY qryEmpWorkers.DailyGrind
PIVOT qryEmployees.Roots;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top