finding most recent records
- From: KRosier <wild_rose@xxxxxxxxxxxx>
- Date: Thu, 20 Jul 2006 20:14:00 GMT
Hi all!
I have a query that pulls information from three different tables. It works great, but I would like it to return only the most recent record for each CharID.
stats_tbl.dated is a date field
I believe I should be using the MAX function, but can't seem to get it in the right place in the right syntax.
Any help would be very much appreciated.
Kathy
Here is the SQL
SELECT character_tbl.charID, character_tbl.Cname, character_tbl.playerID, player_tbl.reg, stats_tbl.laston, stats_tbl.dated
FROM (player_tbl RIGHT JOIN character_tbl ON player_tbl.playerID = character_tbl.playerID) LEFT JOIN stats_tbl ON character_tbl.charID = stats_tbl.charID
WHERE (((player_tbl.reg) Is Null Or (player_tbl.reg)=0) AND ((stats_tbl.laston)<>"3_months"))
ORDER BY character_tbl.Cname;
.
- Follow-Ups:
- Re: finding most recent records
- From: Michel Walsh
- Re: finding most recent records
- Prev by Date: Re: Make Table Query
- Next by Date: Re: Union query
- Previous by thread: Access 97 - global variables??
- Next by thread: Re: finding most recent records
- Index(es):
Relevant Pages
|