Re: Simple / Complicated Query?
- From: banem2@xxxxxxxxx
- Date: Thu, 29 May 2008 22:45:16 -0700 (PDT)
On May 30, 2:21 am, z.ghu...@xxxxxxxxx wrote:
Hi,
I am trying to create a query from a table which has an ID, Diary and
Date fields.
A particular ID may have several diary entries which all have their
specific date.
What I'm after is a query that will show me only the previous 3 diary
entries sorted by date.
Any thoughts would be greatly appreciated
Thanks
Zieshan
It goes something like this (change field names to match your table
field names):
SELECT tblDiary.ID, tblDiary.Diary, tblDiary.Date
FROM tblDiary
WHERE tblDiary.Date In (SELECT TOP 3 tblDiary.Date
FROM tblDiary
GROUP BY tblDiary.Date);
Regards,
Branislav Mihaljev
Microsoft Access MVP
.
- Follow-Ups:
- Re: Simple / Complicated Query?
- From: z . ghulam
- Re: Simple / Complicated Query?
- References:
- Simple / Complicated Query?
- From: z . ghulam
- Simple / Complicated Query?
- Prev by Date: Re: duplicate column name export
- Next by Date: Re: MS Access: Force Form with Data*** To Keep Focus When User Navigates Away -Stumped-
- Previous by thread: Simple / Complicated Query?
- Next by thread: Re: Simple / Complicated Query?
- Index(es):