I am using SQL Server and I have a computed column that uses a function. I am using the GUI query builder to make an update query. This is throwing the following error:
Column ‘inserted.subtotal’ cannot be referenced in the OUTPUT clause because the column definition contains a subquery or references a function that performs user or system data access. A function is assumed by default to perform data access if it is not schemabound. Consider removing the subquery or function from the column definition or removing the column from the OUTPUT clause.
SQL Server cannot return certain types of calculated columns n the OUTPUT clause (MSSQLSERVER_4186) and throws this error if you try.
I do not see a reason to use OUTPUT on an update query. I see that this would be a problem for an INSERT query maybe? But if you requery after doing the insert anyway than I do not see a reason to include the OUTPUT clause.
A proposed solution would be to have a checkbox in the advanced query parameters to exclude the OUTPUT clause entirely. You could also let us list or exclude the fields to include in the OUTPUT clause. A third option would be to only include those columns in the changeset.
I also assume I can just use SQL Mode to get around this (but I like GUI mode!) I’ll try that out.