Joining Crosstab queries

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;
 
J

Jeff Boyce

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

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
A

AGOKP4

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;
 
K

KARL DEWEY

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top