Snort mailing list archives
MS SQL trigger
From: Alexander Novokhatsky <alex.ontario () gmail com>
Date: Tue, 22 Sep 2009 16:06:43 -0400
Hello, snort community.
I'm trying to create a trigger for MS SQL snort database, but I'm a
very noob with SQL. Maybe someone can help me
There is a table event with sid, cid, signature and timestamp fields
I want to write a trigger so if something is deleted from this table
it should be deleted also from table iphdr, for example.
iphdr has cid and sid fields also, so it's the PK
Here is my trigger:
ALTER TRIGGER [dbo].[Cleanup]
ON [dbo].[event]
FOR DELETE
AS
BEGIN
SET NOCOUNT ON;
DELETE FROM iphdr WHERE cid = (SELECT cid FROM Deleted) AND sid=
(SELECT sid FROM Deleted)
END
It's working perfectly but only in case I delete one entry from event
table. If I delete multiple entries it doesn't work
Could you plz help me.
--
Best regards,
Alexander mailto:alex.ontario () gmail com
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users
Current thread:
- MS SQL trigger Alexander Novokhatsky (Sep 22)
- Re: MS SQL trigger acv (Sep 22)
- Re: MS SQL trigger Alexander Novokhatsky (Sep 22)
- Re: MS SQL trigger acv (Sep 22)
