
Announcements
I have many tables in SQL Server that contain UPDATE TRIGGERS. Most are extremely simplistic and are used to keep the Modified date column up to date.
Here is my update trigger:
CREATE TRIGGER [powrapps].[trg_UPD_Amenity]
ON [powrapps].[tbl_Amenity]
AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE t
SET Modified = GETDATE()
FROM powrapps.tbl_Amenity t
JOIN inserted i
ON t.Id = i.Id
END;
I have come to find out that when trying to use Patch() or UpdateIf() with a table that has a trigger, is a problem.
Initially I was just getting the following:
After much searching and tracing the SQL calls, I found the true underlying error:
The target table 'powrapps.tbl_Amenity' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.
I am not using an OUTPUT clause anywhere.
I have disabled my triggers but would prefer to find a solution that doesn't require that.
Any thoughts?
Thank you.
Seems this is an old issue still not resolved (from 2017)