UPDATE c
SET c.SoDiagnosisID = a.SoDiagnosisID
from inv_schmerge c
inner join DiagnosticProc_DS b on
b.DiagnosticProcProcID = c.Diagnosticprocid
inner join Diagnosis_ds a on
a.DiagnosisName=b.DiagnosisName
where c.sodiagnosisid is null
From this example you can see that I am updating...