A family of Microsoft relational database management systems designed for ease of use.
Like this:
SELECT Table.* FROM [Table]WHERE Table.Activated_Date=(SELECT Max(T.Activated_Date) FROM [Table] AS T WHERE T.Serialnumber=Table.SerialNumber)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dear All,
I need to write a query for MSAccess which gives the record having the most recent activation date as in the second table below:
From here you can download the MSAccess database
Thanks
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Like this:
SELECT Table.* FROM [Table]WHERE Table.Activated_Date=(SELECT Max(T.Activated_Date) FROM [Table] AS T WHERE T.Serialnumber=Table.SerialNumber)
That’s what I figured. Sometimes solving the technical aspects is easier than getting a solid specification.
I considered that but since the OP said; "the record having the most recent activation date" I answered that way.
Scott,
Your query will return only a single record rather than a record for each Serialnumber which the OP didn't mention in his post but was apparent in the images. It was a key specification that was somewhat overlooked by the OP.
SELECT TOP 1 table.* FROM table
ORDER BY Activated_Date DESC;