Listing Date

A

AKIRA

I hsaave a table which contains meeting Dates for a
Division. Other words Division XYZ Will have meeting for
that last 4 years. There can many meetings held for this
Division and many Divisions.

I am trying to creat a query which will show the last
four meeting for each Division

IE:
XYZ
1/2/02
2/2/02
3/3/01
XYX
1/2/02
2/3/02
x/x/xx

XXX
 
M

Michel Walsh

Hi,

Your records have a primary key? if so, let us call it pk


SELECT *
FROM myTable As a
WHERE pk IN( SELECT TOP 4 b.pk
FROM myTable as b
WHERE b.Division=a.Division
ORDER BY b.MeetingDate DESC )

ORDER BY Division, MeetingDate DESC



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top