title: Cannot use UPDATE with OUTPUT clause when a trigger is on the table
body: <p>I'm performing an <code>UPDATE</code> with <code>OUTPUT</code> query:</p>
  <pre><code>UPDATE BatchReports
  SET IsProcessed = 1
  OUTPUT inserted.BatchFileXml, inserted.ResponseFileXml, deleted.ProcessedDate
  WHERE BatchReports.BatchReportGUID = @someGuid
  </code></pre>
  <p>This statement is well and fine; until a trigger is defined on the table. Then my <code>UPDATE</code> statement will get the error <a href="http://msdn.microsoft.com/en-us/library/aa937592(v=sql.80).aspx" rel="noreferrer">334</a>:</p>
  <blockquote>
  <p>The target table 'BatchReports' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause</p>
  </blockquote>
  <p>Now this problem is explained in a blog post by the SQL Server team -- <a href="https://techcommunity.microsoft.com/t5/sql-server/update-with-output-clause-8211-triggers-8211-and-sqlmoreresults/ba-p/383457" rel="noreferrer">UPDATE with OUTPUT clause – Triggers – and SQLMoreResults</a>:</p>
  <blockquote>
  <p>The error message is self-explanatory</p>
  </blockquote>
  <p>And they also give solutions:</p>
  <blockquote>
  <p>The application was changed to utilize the INTO clause</p>
  </blockquote>
  <p>Except I cannot make head nor tail of the entirety of the blog post.</p>
  <p>So let me ask my question: What should I change my <code>UPDATE</code> to so that it works?</p>
  <h2>See also</h2>
  <ul>
  <li><a href="http://blogs.msdn.com/b/sqlprogrammability/archive/2008/07/11/update-with-output-clause-triggers-and-sqlmoreresults.aspx" rel="noreferrer">UPDATE with OUTPUT clause – Triggers – and SQLMoreResults</a></li>
  <li><a href="https://stackoverflow.com/questions/6504173/why-is-the-target-table-of-a-merge-statement-not-allowed-to-have-enabled-rules">Why is the target table of a MERGE statement not allowed to have enabled rules?</a></li>
  <li><a href="https://stackoverflow.com/questions/12537653/statement-contains-an-output-clause-without-into-clause-error">Statement contains an OUTPUT clause without INTO clause error</a></li>
  </ul>