FIX: A View With an Outer Join Can Cause An Access ViolationLast reviewed: May 2, 1997Article ID: Q141542 |
The information in this article applies to:
SYMPTOMSA SELECT against a view can result in the following error message:
Msg 530, level 18, State 0 Attempt to insert NULL value into column %d in work table (table id); column does not allow NULLS, UPDATE fails.The connection will be terminated and the SQL Server error log will show a language exec error and an access violation.
CAUSEFor this bug to occur, the view needs to meet the following conditions:
When SQL Server forms the outer join work table, it mistakenly puts NULLS in the work table where the bit field is. By definition, a bit field must be either 0 or 1, and in the case of a NULL it should default to 0; however, in this case it does not.
WORKAROUNDYou can circumvent the problem by avoiding any one of the three conditions that must be present to cause it.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem was corrected in Service Pack 2 for SQL Server version 6.0. For more information, contact your primary support provider.
|
Additional query words: sql6 views tsql
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |