Which table has the column Comp_Deleted? In the following, I am assuming it is in the company table. If not change it to a.Comp_Deleted.UPDATE c SET
c.comp_sp = a.CODESLSP1
FROM
company c
INNER JOIN SAMINC.dbo.ARCUS a ON
a.IDCUST = c.comp_idcust COLLATE Latin1_General_BIN
WHERE
c.Comp_Deleted IS NULL;