Solved

selecting last inserted or updated record from Access table .

Posted on 2002-06-14
3
677 Views
Last Modified: 2008-03-17
Hello ..
I want by using sql statement to select last iserted or updated record from Access table .
Any Idea ?
0
Comment
Question by:yazan3000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
isilver earned 50 total points
ID: 7080021
This works the best if you have a autonumber with the database.  The line is listed below

select * from [table] where [autonumber field] in (select max([autonumber field]) from [table])

[table] - The talble of the record you want to look up.
[autonumber field] - The field that contains the autonumber.  The reason I say to use the autonumber is because the last record that you add will be the largest number.
0
 
LVL 4

Expert Comment

by:ravi_raj123
ID: 7080151
isilver, your comment gives the last inserted record, but how to get last updated record???
0
 

Author Comment

by:yazan3000
ID: 7081575
Thank's isilver
do you have any idea about last updated record ?
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question