FIX: Msg 550 Occurs When Inserting into View 'WITH CHECK OPTION'

ID: Q199793


The information in this article applies to:
  • Microsoft SQL Server version 6.5

BUG #18266 (SQLBUG_65)

SYMPTOMS

If a view created with the 'WITH CHECK OPTION' has a correlated subquery, any attempts to update or insert into this view produces error 550:

Msg 550, Level 16, State 2 The attempted insert or update failed because the target view either specifies WITH CHECK OPTION or spans a view which specifies WITH CHECK OPTION and one or more rows resulting from the operation did not qualify under the CHECK OPTION constraint. Command has been aborted


WORKAROUND

To work around this problem, either avoid using a correlated subquery within a view created with the 'WITH CHECK OPTION', or convert the subquery into an equivalent join form.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 5a for Microsoft SQL Server version 6.5. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.

Additional query words: sub-query sub query err message

Keywords : SSrvStProc SSrvTran_SQL kbbug6.50 kbfix6.50.SP5
Version : winnt:6.5
Platform : winnt
Issue type : kbbug


Last Reviewed: November 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.