Joining Crosstab queries

  • Thread starter Thread starter AGOKP4
  • Start date Start date
A

AGOKP4

hi,

is is possible to combine the 2 crosstab queries below as a single 1 to make
into a report? Alternatively whats the best way to combine them?


Thanks

TRANSFORM Count([Enrolled F Qry].Tenofovir) AS CountOfTenofovir
SELECT [Enrolled F Qry].[Creatinine Group], Count([Enrolled F
Qry].[Creatinine Group]) AS [CountOfCreatinine Group]
FROM [Enrolled F Qry]
GROUP BY [Enrolled F Qry].[Creatinine Group]
PIVOT [Enrolled F Qry].Tenofovir;

TRANSFORM Count([Enrolled F Qry].Tenofovir) AS CountOfTenofovir
SELECT [Enrolled F Qry].[Creatinine Group], Count([Enrolled F
Qry].[Creatinine Group]) AS [CountOfCreatinine Group]
FROM [Enrolled F Qry]
GROUP BY [Enrolled F Qry].[Creatinine Group]
PIVOT [Enrolled F Qry].Tenofovir;
 
Is there a chance you copied one crosstab query two times? How are those
different?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
sorry, one is meant to be Male (M)

Jeff Boyce said:
Is there a chance you copied one crosstab query two times? How are those
different?

Regards

Jeff Boyce
Microsoft Office/Access MVP

AGOKP4 said:
hi,

is is possible to combine the 2 crosstab queries below as a single 1 to
make
into a report? Alternatively whats the best way to combine them?


Thanks

TRANSFORM Count([Enrolled F Qry].Tenofovir) AS CountOfTenofovir
SELECT [Enrolled F Qry].[Creatinine Group], Count([Enrolled F
Qry].[Creatinine Group]) AS [CountOfCreatinine Group]
FROM [Enrolled F Qry]
GROUP BY [Enrolled F Qry].[Creatinine Group]
PIVOT [Enrolled F Qry].Tenofovir;

TRANSFORM Count([Enrolled F Qry].Tenofovir) AS CountOfTenofovir
SELECT [Enrolled F Qry].[Creatinine Group], Count([Enrolled F
Qry].[Creatinine Group]) AS [CountOfCreatinine Group]
FROM [Enrolled F Qry]
GROUP BY [Enrolled F Qry].[Creatinine Group]
PIVOT [Enrolled F Qry].Tenofovir;
 
I would back up two steps, not use two crosstab queries and not use two of
the other queries.

Inyour query [Enrolled F Qry] just add a field to distinguish M/F.


AGOKP4 said:
sorry, one is meant to be Male (M)

Jeff Boyce said:
Is there a chance you copied one crosstab query two times? How are those
different?

Regards

Jeff Boyce
Microsoft Office/Access MVP

AGOKP4 said:
hi,

is is possible to combine the 2 crosstab queries below as a single 1 to
make
into a report? Alternatively whats the best way to combine them?


Thanks

TRANSFORM Count([Enrolled F Qry].Tenofovir) AS CountOfTenofovir
SELECT [Enrolled F Qry].[Creatinine Group], Count([Enrolled F
Qry].[Creatinine Group]) AS [CountOfCreatinine Group]
FROM [Enrolled F Qry]
GROUP BY [Enrolled F Qry].[Creatinine Group]
PIVOT [Enrolled F Qry].Tenofovir;

TRANSFORM Count([Enrolled F Qry].Tenofovir) AS CountOfTenofovir
SELECT [Enrolled F Qry].[Creatinine Group], Count([Enrolled F
Qry].[Creatinine Group]) AS [CountOfCreatinine Group]
FROM [Enrolled F Qry]
GROUP BY [Enrolled F Qry].[Creatinine Group]
PIVOT [Enrolled F Qry].Tenofovir;
 
Back
Top