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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sushma reddy j
    New Member
    • Jan 2015
    • 1

    #1

    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,b ut i have to just keep on updating the last inserted row itself.plz let me know how to do it.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Retrieve the Max() insert date and use that to filter for that record.

    Comment

    Working...