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)
 redundant trigger calling

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-10-26 : 08:48:05
Kamran writes "Hi,

I want to know how to run redundant trigger for deletion.

For e.g. i made a delete trigger on Table1. It updates some record in Table2 and then delete another row in Table1 on some condition.

I assume that this trigger will run again as soon as the previous trigger tries to delete record from Table1. But it does not happening?

I am pasting my trigger here:

=================================
CREATE TRIGGER DeleteGroup ON [Tbl_GroupInfo]
AFTER DELETE
AS
Update Tbl_UserLoginInfo set IsActive = 1
where groupid = (Select groupid from deleted)

delete from Tbl_GroupInfo where ParentId = (Select groupid from deleted)
===================================

A prompt reply will be appreciated.
Regards,
Kamran
dearkami@yahoo.com"

nr
SQLTeam MVY

12543 Posts

Posted - 2004-10-26 : 09:50:39
Look at the recursive triggers setting for tge database.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -