Hi,
I've created the following trigger to keep log of inserts on our recipe table :
CREATE TRIGGER tr_recipe_insert
ON RecipeTable
FOR INSERT
AS
IF EXISTS (SELECT * FROM inserted)
BEGIN
DECLARE @Value varchar(20)
SET @Value = (SELECT REC_PartNo from inserted)
INSERT INTO OperationsLog values( GETDATE(), 'RecipeTable', 'Insert', @Value )
END
, but it doesn't seem to work for multiple inserts. What am I doing wrong ?
I've created the following trigger to keep log of inserts on our recipe table :
CREATE TRIGGER tr_recipe_insert
ON RecipeTable
FOR INSERT
AS
IF EXISTS (SELECT * FROM inserted)
BEGIN
DECLARE @Value varchar(20)
SET @Value = (SELECT REC_PartNo from inserted)
INSERT INTO OperationsLog values( GETDATE(), 'RecipeTable', 'Insert', @Value )
END
, but it doesn't seem to work for multiple inserts. What am I doing wrong ?