Saturday, 14 September 2013

How to get row =1,3 with trigger

How to get row =1,3 with trigger

My trigger: Hi,
I have table tbl_BetSlipEvents Id, event 202, event1 203, event2 204, event
and tbl_BetSlipSystem
In the table tbl_BetSlipEvents inserted regarding on row in the
tbl_BetSlipEvents table Id, BetSlipEventId 73, 202 74, 204
I need to find row 1 and row 3 in the first table and to insert the second
table.
my trigger:
ALTER TRIGGER BetSlipEventsTrigger ON dbo.tbl_BetSlipEvents AFTER INSERT
AS
BEGIN INSERT INTO tbl_BetSlipSystem(BetSlipEventId) SELECT Id FROM
INSERTED WHERE id =352 ; END
where id=352 works, but I need 1 row and 3 row which was inserted in the
table.
So if I inserted in the first table 3 records, I need to find 1 row was
inserted and 3 row was inserted.

No comments:

Post a Comment