I'm receiving an syntax error on the statement below. None of my corrections seem to be working. Have something similar working on another server with 2008 r2.
MERGE INTO dbo.studentparentactivationcodesBACK AS t
USING dbo.studentparentactivationcodes AS src
ON t.[sys id] = src.[sys id]
WHEN NOT MATCHED and src.building='11' THEN
INSERT VALUES (src.[sys id], src.type, src.[last name], src.[first name], src.[middle name], src.[activation code], src.building);