Q:

I can't catch interested ID from inserted and use it in exec of stored procedure

I can't execute a procedure in my trigger with a parameter from the inserted pseudo table.
ALTER TRIGGER [dbo].[Restauracja]
ON [dbo].[RezerwacjaPozycje] 
AFTER INSERT, UPDATE, DELETE
AS 
BEGIN 
    DECLARE @ID INT;

    SELECT IdReservation = @ID 
    FROM INSERTED       

    EXEC SumOrderPositions @ID;
END

If I change @id to f.e. 9. it correctly updates what I want for IdReservation number 9.

A:

If you are inserting only one row, you can simply do the assignment in the correct order:
BEGIN 
    DECLARE @ID  int;
    SELECT @ID = IdReservation
    FROM INSERTED;    

    EXEC SumOrderPositions @ID;
END;

However, this is a bug waiting to happen.  Instead, you may want to use a cursor, loop through the rows in inserted using some other mechanism, or check that there is only one row in inserted.  I'm not sure the exactly logic that you want.

