General information
Forum:
Microsoft SQL Server
I got it:
CREATE TRIGGER TR_TRANSACTION_INSERT ON [dbo].[Transaction]
INSTEAD OF INSERT
AS
BEGIN
Declare @Quart int, @DhCreation datetime
SELECT @DhCreation = DhCreation FROM INSERTED
SET @Quart = dbo.GetQuartID(@DhCreation)
INSERT INTO [Transaction] (DhCreation, QuartID) values (@DhCreation,@Quart)
END
===============
IT SEEMS that a SELECT is required and that the inserted by itself is not valid..
Thanks.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only