Viewing 4 posts - 1 through 5 (of 5 total)
I don't think I have been very clear.
I have an audit table that I want to use in order to monitor when data was last inserted into certain tables. It...
April 29, 2014 at 12:10 pm
Hi Jeff,
Would the below be a better solution?
CREATE TRIGGER [TriggerName]
ON [InsertDataIntoThisTable]
INSTEAD OF INSERT
AS
BEGIN
DECLARE @Count INT
SELECT @Count = COUNT(*) FROM inserted
END
IF
@Count > 0
UPDATE
[AuditTable]
SET LastUpdated = GETDATE()
WHERE ...
Many thanks
April 29, 2014 at 3:52 am
Thanks for the swift response Lowell.
The data is inserted using SSIS packages which state the number of rows that have gone in - thanks for the suggestion though.
Many thanks again.
April 28, 2014 at 5:12 am
Thanks for the reply. I am now able to use the Database I wanted.
Many thanks,
Ben B
October 24, 2013 at 3:32 am
Viewing 4 posts - 1 through 5 (of 5 total)