Re: total query with last date
- From: zionsaal@xxxxxxxxx
- Date: Wed, 20 Jun 2007 09:14:51 -0700
On Jun 19, 8:59 pm, John W. Vinson
<jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On Tue, 19 Jun 2007 17:45:20 -0700, zions...@xxxxxxxxx wrote:
I have a table with 5 fields
ID PersonID Date Amount and Type
I want a query with the last record of each person based on date and I
want the results like this
PersonID LastOfDate Amount Type
How can i do that
thanks
A Subquery will do this:
SELECT PersonID, [Date], Amount, Type
FROM tablename
WHERE [Date] =
(SELECT Max([Date]) FROM tablename AS X
WHERE X.PersonID = tablename.PersonID);
John W. Vinson [MVP]
thank you john!
.
- References:
- total query with last date
- From: zionsaal
- Re: total query with last date
- From: John W . Vinson
- total query with last date
- Prev by Date: Re: Parsing inconsistent data
- Next by Date: Re: parsing dates
- Previous by thread: Re: total query with last date
- Next by thread: Re: total query with last date
- Index(es):
Relevant Pages
|