Kodo
"The Shoe"
- Local time
- Yesterday, 23:23
- Joined
- Jan 20, 2004
- Messages
- 707
ok, I have a trigger set up to grab a value from the deleted table
the delete method I'm using uses DELETE FROM
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!
Code:
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
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!
Last edited: