I have been unsuccessfully trawling StackOverflow and other sites to solve my error so time to post and see if someone can tell me where I'm going wrong.
My system has a PowerApp with a simple form. On saving the form, the fields are written to table1. I then want to create a trigger on table1 so that one field from each new record is inserted into table2.
Despite there being no output clause in my code, I am getting the following error:
The requested operation is invalid. Server Response: Microsoft SQL: The target table 'table1' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause. inner exception: Microsoft SQL: The target table 'table1' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause.
Stripping my code back to the following still throws the same error:
ALTER TRIGGER [dbo].[FormatID]
ON [dbo].[table1]
AFTER INSERT
AS
BEGIN
INSERT INTO [dbo].[table2](origID)
VALUES (1)
END
Any suggestions please fire away, I feel as though I am missing something obvious...