L
Linda RQ
Hi Everyone,
Using Access 2003. SQL for my query is below in case it helps but I use the
query grid. My ultimate goal is to get a total count of each type of
therapy in each area. My query is showing all the appropriate records but I
don't have a total of each therapy, instead if there is a repeat of each
therapy for each area. Hope my example shows up looking
right....................Thanks, Linda
This is what my crosstab query shows....
Therapy type ICU
PROG MEDT
Aerosol
1
Aerosol Protocol 1
Aerosol 1
Aerosol Protocol
1
Aerosol
1
Aerosol Protocol 1
Aerosol Protocol 1
Aerosol 1
This is how I want it to look...
Therapy type ICU
PROG MEDT
Aerosol 2
1 1
Aerosol Protocol 2
1 1
TRANSFORM Count(tblTherapyType.TherapyTypeID) AS CountOfTherapyTypeIDSELECT
tblTherapyType.TherapyDescFROM tblTherapyType INNER JOIN ((tblPatients INNER
JOIN tblPtThpy ON tblPatients.PtID = tblPtThpy.PtID_fk) INNER JOIN
(tblAreaList INNER JOIN tblPtLocation ON tblAreaList.AreaID =
tblPtLocation.AreaID_fk) ON tblPatients.PtID = tblPtLocation.PtID_fk) ON
tblTherapyType.TherapyTypeID = tblPtThpy.ThpyTypeID_fk
WHERE (((tblPtThpy.ThpyEndDtTm) Is Null))GROUP BY tblPtThpy.ThpyEndDtTm,
tblPatients.PtID, tblPtThpy.PtThpyID, tblTherapyType.TherapyDesc PIVOT
tblAreaList.AreaName;
Using Access 2003. SQL for my query is below in case it helps but I use the
query grid. My ultimate goal is to get a total count of each type of
therapy in each area. My query is showing all the appropriate records but I
don't have a total of each therapy, instead if there is a repeat of each
therapy for each area. Hope my example shows up looking
right....................Thanks, Linda
This is what my crosstab query shows....
Therapy type ICU
PROG MEDT
Aerosol
1
Aerosol Protocol 1
Aerosol 1
Aerosol Protocol
1
Aerosol
1
Aerosol Protocol 1
Aerosol Protocol 1
Aerosol 1
This is how I want it to look...
Therapy type ICU
PROG MEDT
Aerosol 2
1 1
Aerosol Protocol 2
1 1
TRANSFORM Count(tblTherapyType.TherapyTypeID) AS CountOfTherapyTypeIDSELECT
tblTherapyType.TherapyDescFROM tblTherapyType INNER JOIN ((tblPatients INNER
JOIN tblPtThpy ON tblPatients.PtID = tblPtThpy.PtID_fk) INNER JOIN
(tblAreaList INNER JOIN tblPtLocation ON tblAreaList.AreaID =
tblPtLocation.AreaID_fk) ON tblPatients.PtID = tblPtLocation.PtID_fk) ON
tblTherapyType.TherapyTypeID = tblPtThpy.ThpyTypeID_fk
WHERE (((tblPtThpy.ThpyEndDtTm) Is Null))GROUP BY tblPtThpy.ThpyEndDtTm,
tblPatients.PtID, tblPtThpy.PtThpyID, tblTherapyType.TherapyDesc PIVOT
tblAreaList.AreaName;