SQL Server error code
SQL Server error 4186
SQL Server raises error 4186 at severity 16, which marks a problem with the query or data that you can correct.
Column '%ls.%.*ls' 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.
| Msg | 4186 |
|---|---|
| Severity | 16 |
| Group | 4000–4999 |
What it means
To prevent nondeterministic behavior, the OUTPUT clause cannot reference a column from a view or inline table-valued function when that column is defined by one of the following methods:
A subquery.
A user-defined function that performs user or system data access, or is assumed to perform such access.
A computed column that contains a user-defined function that performs user or system data access in its definition.