473,320 Members | 1,732 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,320 software developers and data experts.

fetching a last record inserted from a table and updating it.

hi all,
i have a table with 3 columns,
ie,
a column with data char (53),
a column which stores date,
a column which stores time of insertion of record into the table.
I need to write a query which retrieves the last inserted record and update the first column which is having data with current timestamp.
the insertion is happening automaticly due to the execution of a job and the data is logged automatically,but i have to just keep on updating the last inserted row itself.plz let me know how to do it.
Jan 27 '15 #1
1 1750
Rabbit
12,516 Expert Mod 8TB
Retrieve the Max() insert date and use that to filter for that record.
Jan 27 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Matt | last post by:
how to get the last record from database without looping? Whenever the user need to insert a new record to the database, it just increment the id field by one from the last record. I tried...
4
by: Carlos San Miguel | last post by:
Hi, I'm going to be using Oracle with a customer. I will access Oracle with ODBC. All the tables have an Identity column, this is the ID for the record. I need to know how I can get the value of...
3
by: Mark | last post by:
I'm using ASP.Net to accress a database, what I need to do is get the fields out of the very last record in the db. How do I do this? Actually I'm after the primary key, titled 'AdID' it'll tell...
2
by: pranjalraje | last post by:
can you please help me with sql querry for 'finding last record in a table'
4
by: aaronyoung | last post by:
I have created custom navigation buttons and Record Number indicators on several forms that are used to review and update records based on a query. My On Current event to update the "Record X of...
2
by: TimSki | last post by:
Hi, In my asp page I am inserting a record in to the sql server 2005 db as follows... OpenDataConnection() oConn.BeginTrans set cm = CreateObject("ADODB.Command") set cm.ActiveConnection =...
2
by: Jim in Arizona | last post by:
I forgot what the SQL command was to return the key of the last inserted record. Does anyone happen to know what it is? Thanks, Jim --
0
by: Van Fitz | last post by:
I am importing an excel worksheet into an existing access 2000 table using TransferSpreadsheet. Im using a timestamp field as well in this table. This is going well, however, once the data is...
3
by: SDaxx | last post by:
I am still learning access, vba and sql and am in need of some assistance. I have a table (tblCommercial) with the following these fields: ReferenceNumber(autonumber) AccountNumber, CompanyName,...
7
by: Lynch225 | last post by:
Hello all, I have an issue with a form updating all records in a table except for the very last record for some reason. A little background, I have an unmatched query that appends results to a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.