Ver originalUPDATE tabla1 SET custom3 = 'C'FROM tabla1 T1INNER JOIN tabla2 T2 ON T1.id = T2.idWHERE Active = 'Y' AND t3 = 'D' AND DATEADD(DAY,T2.dias,Date_joined) < getdate()