C
Craig
Hi,
I have a table with fields: Task Name, Revision Number, Effective Date,
Descr, etc
So it looks something like:
Record 1: "Task A",1, 1/1/08,"abc"
Record 2: "Task A",2,1/1/09,"xyz"
Record 3: "Task B",1,1/1/02,"efg"
Record 4: "Task B",2,2/3/01,"aaa"
Record 5: "Task C",1,1/2/99,"xxx"
I want to be able to select records with the latest (highest) revision
number whenever there are two records with the same task name.......
so, based on the above 5 records, I want to only get these 3 in my query
results as follows:
Record 2: "Task A",2,1/1/09,"xyz"
Record 4: "Task B",2,2/3/01,"aaa"
Record 5: "Task C",1,1/2/99,"xxx"
(records 1 and 3 would not be selected as they are not the latest (highest)
revision numbers of the relevant task)
I tried the Totals Row with
"Group by" for Task Name,
"MAX" for Revision Number,
"LAST" for Effective Date
"LAST" for Description
but thats not reliable as when you make changes to effective date and
description fields in the table in those records that should not be selected
in the query, the latest info i entered , ended up at times next to the
latest revision number in the selected records.
Any ideas? Much appreciated!!
Craig
I have a table with fields: Task Name, Revision Number, Effective Date,
Descr, etc
So it looks something like:
Record 1: "Task A",1, 1/1/08,"abc"
Record 2: "Task A",2,1/1/09,"xyz"
Record 3: "Task B",1,1/1/02,"efg"
Record 4: "Task B",2,2/3/01,"aaa"
Record 5: "Task C",1,1/2/99,"xxx"
I want to be able to select records with the latest (highest) revision
number whenever there are two records with the same task name.......
so, based on the above 5 records, I want to only get these 3 in my query
results as follows:
Record 2: "Task A",2,1/1/09,"xyz"
Record 4: "Task B",2,2/3/01,"aaa"
Record 5: "Task C",1,1/2/99,"xxx"
(records 1 and 3 would not be selected as they are not the latest (highest)
revision numbers of the relevant task)
I tried the Totals Row with
"Group by" for Task Name,
"MAX" for Revision Number,
"LAST" for Effective Date
"LAST" for Description
but thats not reliable as when you make changes to effective date and
description fields in the table in those records that should not be selected
in the query, the latest info i entered , ended up at times next to the
latest revision number in the selected records.
Any ideas? Much appreciated!!
Craig