Query Help

M

Manik

Lets say I have table like this.


BuildingName BuildingRanking CertificationDate
----------------------------------------------------------
A 51 5/6/02
A 76 6/4/03
B 87 7/8/01
B 91 10/3/01

What should be my querry to pull up the Building Name and
its latest Building Ranking., i.e., ranking assigned
recently.
 
J

John Spencer (MVP)

One method:

SELECT BuildingName, BuildingRanking, CertificationDate
FROM Tablename
WHERE CertificationDate =
(Select Max(T.CertificationDate) as LastDate
FROM TableName as T
WHERE T.BuildingName = Tablename.BuildingName)
 
J

John Spencer (MVP)

That means Access doesn't know what "BuildingName" is. Make sure that you
replaced your field names with the ones I used in the example.
 

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

Top