Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
pussher
Starting Member
1 Post |
Posted - 2002-07-10 : 08:16:49
|
I've an access database, with the most important fields being "refId" and "dateAdded". The database contains several records such as:refId, dateAdded****************1, 11/07/022, 11/07/023, 11/07/024, 11/07/025, 11/07/026, 11/07/027, 11/07/021, 10/07/02...I would like to run a query that only selects the 5 most recent records (referring to the dateAdded). I've tried the following, but this returns 7 records with date 11/07/02."select top 5 dateAdded from tblTest order by dateAdded desc"Does anyone can help me out with this? Thx! |
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2002-07-10 : 12:15:42
|
select top 5 dateAdded from tblTest order by dateAdded desc,refid |
 |
|
|
|
|