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)
 Instead of Trigger

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-10-27 : 08:54:10
Niladri Saha writes "I have created a instead of delete trigger on a table.Within the trigger I have written some code.When I am deleting a row from a table i will transafar that row into another table.
let's take an example.
There are two tables
1. MainTable
2. BackupTable.

I have created instead of delete trigger on Maintable.within the trigger I have written code for transfar that deleted row into another table backupTable.

when I issued a delete statement on table MainTable it will work perfectly. But when i issued a delete statement like

delete Maintable
where mainTable_Key in(1,2,3)

in this case I have noticed all the record are deleted from Maintable but only the last row i.e value 3 is only added in BackupTable.

it should add all the rows in BackUptable.
I don't understand why this is happening??

can any one give explanation??"

surefooted
Posting Yak Master

188 Posts

Posted - 2004-10-27 : 09:59:10
Please post the code in your trigger

-Jon
Should still be a "Starting Member" .
Go to Top of Page
   

- Advertisement -