L
Linda RQ
Access 2003. I've been doing pretty well lately making queiris but this one
for some reason, I can't get.....I have a query that has Vent Start Date and
Time and Vent End Date and Time. I made an expression but it is giving me
the answer in days. I need it in hours. I pasted the sql below because I
know you guys can understand the sql better than my descriptions :^ )
VentLOS: Format([ThpyEndDtTm]-[ThpyStDtTm])
SELECT tblPatients.PtLName, tblPatients.PtID, tblPatients.AdmitDtTm,
tblPatients.DCDtTm, tblPatients.AdmitNum, tblPtThpy.PtThpyID,
tblAreaList.AreaName, tblTherapyType.TherapyTypeID,
tblTherapyType.TherapyDesc, tblPtThpy.ThpyStDtTm, tblPtThpy.ThpyEndDtTm,
Format([ThpyEndDtTm]-[ThpyStDtTm]) AS VentLOS
FROM (tblPatients INNER JOIN (tblAreaList INNER JOIN tblPtLocation ON
tblAreaList.AreaID = tblPtLocation.AreaID_fk) ON tblPatients.PtID =
tblPtLocation.PtID_fk) INNER JOIN (tblTherapyType INNER JOIN tblPtThpy ON
tblTherapyType.TherapyTypeID = tblPtThpy.ThpyTypeID_fk) ON tblPatients.PtID
= tblPtThpy.PtID_fk
GROUP BY tblPatients.PtLName, tblPatients.PtID, tblPatients.AdmitDtTm,
tblPatients.DCDtTm, tblPatients.AdmitNum, tblPtThpy.PtThpyID,
tblAreaList.AreaName, tblTherapyType.TherapyTypeID,
tblTherapyType.TherapyDesc, tblPtThpy.ThpyStDtTm, tblPtThpy.ThpyEndDtTm
HAVING (((tblAreaList.AreaName)="picu") AND
((tblTherapyType.TherapyTypeID)=70 Or (tblTherapyType.TherapyTypeID)=81))
ORDER BY tblPatients.AdmitNum;
Thanks,
Linda
for some reason, I can't get.....I have a query that has Vent Start Date and
Time and Vent End Date and Time. I made an expression but it is giving me
the answer in days. I need it in hours. I pasted the sql below because I
know you guys can understand the sql better than my descriptions :^ )
VentLOS: Format([ThpyEndDtTm]-[ThpyStDtTm])
SELECT tblPatients.PtLName, tblPatients.PtID, tblPatients.AdmitDtTm,
tblPatients.DCDtTm, tblPatients.AdmitNum, tblPtThpy.PtThpyID,
tblAreaList.AreaName, tblTherapyType.TherapyTypeID,
tblTherapyType.TherapyDesc, tblPtThpy.ThpyStDtTm, tblPtThpy.ThpyEndDtTm,
Format([ThpyEndDtTm]-[ThpyStDtTm]) AS VentLOS
FROM (tblPatients INNER JOIN (tblAreaList INNER JOIN tblPtLocation ON
tblAreaList.AreaID = tblPtLocation.AreaID_fk) ON tblPatients.PtID =
tblPtLocation.PtID_fk) INNER JOIN (tblTherapyType INNER JOIN tblPtThpy ON
tblTherapyType.TherapyTypeID = tblPtThpy.ThpyTypeID_fk) ON tblPatients.PtID
= tblPtThpy.PtID_fk
GROUP BY tblPatients.PtLName, tblPatients.PtID, tblPatients.AdmitDtTm,
tblPatients.DCDtTm, tblPatients.AdmitNum, tblPtThpy.PtThpyID,
tblAreaList.AreaName, tblTherapyType.TherapyTypeID,
tblTherapyType.TherapyDesc, tblPtThpy.ThpyStDtTm, tblPtThpy.ThpyEndDtTm
HAVING (((tblAreaList.AreaName)="picu") AND
((tblTherapyType.TherapyTypeID)=70 Or (tblTherapyType.TherapyTypeID)=81))
ORDER BY tblPatients.AdmitNum;
Thanks,
Linda