• I'm not sure that's a legal operation. From Books Online (emphasis mine):

    The OUTPUT clause is not supported in the following statements:

    * DML statements that reference local partitioned views, distributed partitioned views, or remote tables.

    * INSERT statements that contain an EXECUTE statement.

    * Full-text predicates are not allowed in the OUTPUT clause when the database compatibility level is set to 100.

    * The OUTPUT INTO clause cannot be used to insert into a view, or rowset function.

    A user-defined function cannot be created if it contains an OUTPUT INTO clause that has a table as its target.

    But let's assume it were indeed legal. It's slightly unusual, because you don't include any of the updated columns in your OUTPUT clause. So even though you're not updating the F8 column, you still have to refer to it as Inserted or Deleted (since you didn't update it, it doesn't matter which). Something like this may work, or you may have to tweak it a little:UPDATE c

    SET

    c.active =CASE

    WHEN F51 < GETDATE() THEN 0

    WHEN F51 > GETDATE() THEN 1

    END

    ,c.dateModified = GETDATE()

    FROM myexcel...Company c

    JOIN mastercompany m ON c.F8 = m.company

    OUTPUT

    m.company

    ,inserted.F8

    INTO #updated

    John