The column reference is not allowed because it refers to a base table that is not being modified in this statement.

This error occurs when you try and populate a table using the OUTPUT clause AND the target of the main statement has a trigger on it.

Shame, currently I don't know of any work around. BOL clearly states that you can't have triggers and populate an table from the OUTPUT clause.


-
Published 28 September 2009 17:20 by simonsabin

Comments

13 October 2009 19:57 by SqlServerKudos

# The column reference is not allowed because it refers to a base table that is not being modified in this statement.

Kudos for a great Sql Server article - Trackback from SqlServerKudos