Query showing odd result

G

Gareth Mercer

Hiya all,

using the following query, I am trying to display the last
recordset present in a table.

SELECT DISTINCT TOP 1 Last([Update Report].UpdateReportID)
AS LastOfUpdateReportID, [Update Report].Months_Selected
FROM [Update Report]
GROUP BY [Update Report].Months_Selected;

However, using the following table

UpdateReportID Date_Generated Months_Selected
1 07-Oct-03 2
2 07-Oct-03 1
3 07-Oct-03 1
4 07-Oct-03 2
(AutoNumber)

the record set being returned by the query is

LastOfUpdateReportID Months_Selected
3 1

Any ideas why this Access is returning recordset 3 instead
of recordset 4?

Thanks in Advance

Gareth
 

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