This trigger:
ALTER TRIGGER InsteadTrigger on CustomerView
INSTEAD OF INSERT
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO Person
SELECT FirstName, LastName
FROM inserted
Causes this query to return null.
INSERT INTO CustomerView (FirstName, LastName) Values ('Jonathan', 'Allen')
SELECT SCOPE_IDENTITY()
Is there a way to fix the trigger so that SCOPE_IDENTITY will return the correct value? (I can't use @@IDENTITY because there may be other triggers on the table involved.)