473,394 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Most recent date

I have a databse tracking container movements. I am happily recording
each movement and the date of movement and can see where each
container is by sorting by date of movement. Is there a way I can
produce a query which would show, for each container, only the most
recent move
Jun 27 '08 #1
3 1441
In Design View for the query, select View - SQL and paste this in,
substituting
your actual object names for ContainerID , MovementDate and
ContainerTrackingTable

SELECT ContainerID AS Expr1, Max(Movementdate) AS max_date
FROM ContainerTrackingTable
GROUP BY ContainerID;

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200805/1

Jun 27 '08 #2
On May 17, 10:56*pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
In Design View for the query, select View - SQL and paste this in,
substituting
your actual object names for ContainerID , MovementDate and
ContainerTrackingTable

SELECT ContainerID AS Expr1, Max(Movementdate) AS max_date
FROM ContainerTrackingTable
GROUP BY ContainerID;

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2008...
Thank you - works like a charm
Jun 27 '08 #3
Glad to help!

Steve wrote:
>On May 17, 10:56 pm, "Linq Adams via AccessMonster.com" <u28780@uwe>
wrote:
>In Design View for the query, select View - SQL and paste this in,
substituting
[quoted text clipped - 11 lines]
>>
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2008...

Thank you - works like a charm
--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.accessmonster.com

Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Nova's Taylor | last post by:
Hi folks, I am a newbie to Python and am hoping that someone can get me started on a log parser that I am trying to write. The log is an ASCII file that contains a process identifier (PID),...
3
by: TJM | last post by:
hello, I have a table which contains the audit time field. This audit time field records the current date and time when a record is inserted. I would like to output the most recent top 500 rows....
6
by: HandersonVA | last post by:
There are several day_timestamp for each index_id. Anyone can help me to write a sql to generate the most recent day_timestamp of index_ids which has not accessed into the system in 90 days from...
2
by: Shaiguy | last post by:
I have a table containing the following fields: ProjectUpdateID (PrimaryKey) ProjectID UpdateDate I would like to create a Query in Ms Access 2000 which will return me the most recent 2...
4
by: doublej0 | last post by:
I have the following issue when trying to write a SQL statement to accomplish my goal. I have done a lot of research, but have been unsuccessful in creating the query. I have two tables, one with...
10
by: perryche | last post by:
Experts, I have the following scenario: Table1: RecordID RecordDate ... I want in a query to show me within this RecordID, only the latest RecordDate and info. I know I can use the Max...
4
by: Lee | last post by:
I have an application where I need to find the most recent file placed in a folder. For example, my users periodically place an image file with the format "ImageXXXX.jpg" (where XXXX is some...
5
by: bill1313 | last post by:
I'm currently working on a component tracking file and we are using an hour meter query to always have up to date information. My problem is that I need the hour meter query to display the reading of...
4
by: bill1313 | last post by:
I'm currently working on a component tracking file and we are using an hour meter query to always have up to date information. My problem is that I need the hour meter query to display the reading of...
3
by: AnthonyT | last post by:
Hi All I have a major problem with an access query and I am near the end of my tether! I have taken over a project with a badly built access database and as resources are not available to start...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.