Please try the following.
The issue was pertaining to the single quotes inside single quotes overall.
They need to be doubled.
SQL
DECLARE @t NVARCHAR(MAX);
DECLARE @tablename NVARCHAR(128);
SET @tablename = ?
SET @t = 'UPDATE t
SET t.CampaignCode = s.CampaignCode,
t.CampaignDescription = s.CampaignDescription,
t.MediaDescription = s.MediaDescription,
t.NoOfCatalogs = ISNULL(CAST(replace(s.NoOfCats,'','','''') AS INT), 0),
t.PromotionCode = s.PromotionCode,
t.PromotionDescription = s.PromotionDescription
FROM ' + @tablename + ' t
LEFT OUTER JOIN
MaginusStaging.dbo.MediaCode_CampaignCode s
ON t.MaginusMediaCode = s.MediaCode
WHERE t.MaginusMediaCode IS NOT NULL';