Kodo
01-17-2006, 12:19 PM
ok, I have a trigger set up to grab a value from the deleted table
ALTER TRIGGER ECShipment_Update_Cartmember
ON dbo.ECShipment
FOR DELETE
AS
DECLARE @cartmemberid bigint
set @cartmemberid=(SELECT top 1 shipment_cartmemberid from DELETED)
exec spECMergeCartMembers @cartmemberid
the delete method I'm using uses DELETE FROM [table] WHERE [field] IN(list of id's)
now, I've figured out the hard way that the trigger only fires on one event not on every row deletion. So I have to select one value from the deleted table and I thought I could use the above to accomplish this. The id that gets returned is irrelevant so long as I can get one returned (yes, there is a bit of necessary denormalization). My problem is that the trigger won't return any values. Any one have any clue how I go about this? (SQLHell?)
Thanks in advance! :)
ALTER TRIGGER ECShipment_Update_Cartmember
ON dbo.ECShipment
FOR DELETE
AS
DECLARE @cartmemberid bigint
set @cartmemberid=(SELECT top 1 shipment_cartmemberid from DELETED)
exec spECMergeCartMembers @cartmemberid
the delete method I'm using uses DELETE FROM [table] WHERE [field] IN(list of id's)
now, I've figured out the hard way that the trigger only fires on one event not on every row deletion. So I have to select one value from the deleted table and I thought I could use the above to accomplish this. The id that gets returned is irrelevant so long as I can get one returned (yes, there is a bit of necessary denormalization). My problem is that the trigger won't return any values. Any one have any clue how I go about this? (SQLHell?)
Thanks in advance! :)