Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Deleting records to another table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-05-12 : 07:04:59
Shaneil writes "I have a stored procedure for Insert,Update,Delete in SQL Server 2000 SP3. When I delete a record from the database using the Delete stored procedure I want the record to go another table with the time and date it was deleted and by who.

How can I achieve this?

Thanks."

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-05-12 : 07:12:13
With an INSERT statement before your DELETE statement.

Jay White
{0}
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-12 : 11:05:16
Or if you don't want the delete to be isolated to the sproc, you can use a trigger.



Brett

8-)
Go to Top of Page
   

- Advertisement -