In SQL server 2008 sp3, I have an issue with merge and it is reported as a connect item for SQL server 2008 sp1 and there is a fix in CU7 at: http://support.microsoft.com/kb/981037
The exception I get is : "Attempting to set a non-NULL-able column's value to NULL"
There are no NULL values in my source recordset. If I disable the foreign keys or populate the table with a lot more data, everything works fine. Does anyone of you experience the same issue?
Here is one of the connect items and it seems like the issue still exists in SP2: http://connect.microsoft.com/SQLServer/feedback/details/532561/attempting-to-set-a-non-null-able-columns-value-to-null-on-sql-2008-sp1-and-2008-r2-ctp
asked May 16 '12 at 07:48 AM in Default
By deleting an index with columns that already was covered by another nonclustered index, I got a new execution plan without any table spool, and according the support item the table spool is causing the issue. :(
I would say that the issue that was supposed to be fixed in CU7 is still existing in SP3
You can read more about it at our blog: http://www.sqlservice.se/sv/start/blogg/merge-issue-attempting-to-set-a-nonnullable-column-s-value-to-null.aspx