This looks to me like a bug with MERGE statement. This does not work on SQL 2008 and 2008 R2.
Note that the first commneted statement works properly but the second does not.
Is there any explanation why not, other than a bug?
Duplication script below.
IF object_id('dbo.Test', 'U') IS NOT NULL
DROP TABLE dbo.Test
IF object_id('dbo.Src', 'U') IS NOT NULL
DROP TABLE dbo.Src
CREATE TABLE dbo.Test
intID int NOT
(sysID, ioID, Code)
VALUES (1, 1,
NONCLUSTERED INDEX [UIXF_Test]
View Complete Post