Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify last updated record

Status
Not open for further replies.

Savil

Programmer
Apr 28, 2003
333
EU
Hi
If I have an update trigger on a table and the table is updated, how can I identify to the trigger the updated record that initiated the trigger?

I need to have a system that records changes to a financial database. My idea is that the trigger can insert a record into a logging table. If anyone has any other method of doing this then I would be delighted to hear them.

Thanks
 
Do you mean something like :
--trigger code--
SELECT * FROM myTable where id = SCOPE_IDENTITY()

which would identify the last record inserted in that scope

All the IT jobs in one place -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top