Creating unique valued queries from non-unique tables

B

Brien Clark

I'm trying to create a query that has all unique values. I am working with
two tables: IDFeatures and Readings.

The IDFeatures table contains all the IDfeatures (a unique number given to
each object) as well as some static information pertaining to each IDfeature.
In this table, there are no duplicate IDfeatures.

The Readings table has readings and dates for each IDfeature. There are
multiple readings/dates for many of the IDfeatures, so there are duplicate
IDfeatures (with different readings/dates).

The tables are set up with a relationship so that the IDfeature is correlated.

Right now, I can only create a query that displays all the readings (with a
duplicate IDfeature for each different reading). I am trying to create a
query that displays only one IDfeature with the most current readings from
the Readings table. Using the DISTINCT command does not work, since the
Readings table has non-duplicate columns (i.e. different readings dates).

Does anyone have any ideas? Thank you
 
S

Sharkbyte

If you have a ReadingID field, or the date of the reading, group on that
field and choose MAX. This will give you the last record.

Sharkbyte
 
B

Brien Clark

In which view are you refering? Datasheet or design? I cannot seem to find
any MAX command, and the help file doesn't list it. Can you be more
specific? Thank you
 

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