0

I wrote an AFTER INSERT Trigger in my Azure SQL DB, which works just fine from within SSMS.

However, I am working with a JavaScript developer creating an application which writes to the Parent Table. The calling application needs to capture what was actually inserted. So, the Javascript statement is: Insert Into {my Table]... OUTPUT INSERTED.* Values (..... The T-SQL OUTPUT clause description specifically states "Triggers cannot be defined on the target."

Does anyone have suggestions for another way around this limitation? Do we have write a Procedure to query the Parent and Insert Into the Child?

1 Answer 1

1

DML statements cannot have any enabled triggers if the statement contains an OUTPUT clause without any INTO clause.

There's an article about this on the Microsoft SQL Programmability & API Development Team Blog.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.