Microsoft KB Archive/199793

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

Article ID: 199793

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q199793



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 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.

Additional query words: sub-query sub query err message

Keywords: kbbug kbfix KB199793

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.