Error in setting a value in sql server trigger
You have a derived table in the from clause without an alias.

This will give you the same error:

select *
from (
     select *
     from YourTable
     );


Add an alias to the derived table.

select *
from (
     select *
     from YourTable
     ) as T;


Note: Your trigger will fail if you insert more than one row at a time. The trigger is executed once per insert statement, not once per row.