I have a trigger in SQL Server like this:
CREATE TRIGGER tblMMMaterials_ITrig ON dbo.tblMMMaterials FOR INSERT AS
[all sorts of stuff that works...]
INSERT INTO tblMMMaterialCategoryMatrix (materialid, categoryID, [Primary]) VALUES (inserted.MaterialID, inserted.CategoryID, Yes) WHERE inserted.CategoryID IS NOT NULL
but when I click the **check syntax** button, I get the following error message:
Error 128: The name 'MaterialID' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.