Update a table from a join
I assume you are trying to set isactive in the department table to the same value currently in projects, for all rows involving the specified duid.

UPDATE d
  SET isactive = p.isactive
FROM dbo.GEMS_DEPARTMENT AS d
INNER JOIN dbo.GEMS_PROJECTS AS p
ON RTRIM(d.du_proj_id) = p.du_id
WHERE p.du_id = @duid;


The most common answer for this problem is found here.