W
Wissam
Hi,
The following is an example of a QUERY (qryApt) based on a table of patient
appointments (tbleApt) with primary key field called Apt#; the query is
ordered by PatientID and by AptDate (ascending):
Apt# PatientID AptDate BloodPressure
1 A1 1/1/2008 Normal
2 A1 2/1/2008 High
3 A1 3/1/2008 Normal
4 B1 1/7/2008 High
5 B1 2/3/2008 Normal
6 B2 4/2/2008 High
I need an SQL/code for a query (call it "qryLastApts") that does the
following: "for each patientID in qryApt, select only the last record for
that PatientID"?
Thanks a lot.
The following is an example of a QUERY (qryApt) based on a table of patient
appointments (tbleApt) with primary key field called Apt#; the query is
ordered by PatientID and by AptDate (ascending):
Apt# PatientID AptDate BloodPressure
1 A1 1/1/2008 Normal
2 A1 2/1/2008 High
3 A1 3/1/2008 Normal
4 B1 1/7/2008 High
5 B1 2/3/2008 Normal
6 B2 4/2/2008 High
I need an SQL/code for a query (call it "qryLastApts") that does the
following: "for each patientID in qryApt, select only the last record for
that PatientID"?
Thanks a lot.