I have a stored procedure that updates the source column used in a computed column.
That stored procedure has
SET ANSI_WARNINGS OFF;.
When the procedure executes, and tries to update the source column, the following error message is received:
Msg 1934, Level 16, State 1, Procedure my_PROC, Line XX UPDATE failed because the following SET options have incorrect settings: 'ANSI_WARNINGS'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.
The error stops when either:
- We stop turning
- The source column (the one used in deriving the computed column) is removed from the update statement.
There is one clustered index and one non-clustered index, both on columns which are not involved in any way in the computed column definition.
What is it about the column being used in a computed column that causes this error?