select distinct s.SelectionID into #tempSelections from ISZL.T_DISP_DIRECT_LINK ddl
join ISZL.T_SELECTION s on ddl.Selection = s.SelectionID

update selection
set selection.MO = (
	select top 1 dd.MO
	from ISZL.T_SELECTION s
	join ISZL.T_DISP_DIRECT_LINK ddl on ddl.Selection = s.SelectionID
	join ISZL.T_DISP_DIRECT dd on dd.DispDirectID = ddl.DispDirect
	where dd.Mo is not null and s.SelectionID = selection.SelectionID)
from ISZL.T_SELECTION selection
where selection.MO is null and selection.SelectionID in (select * from #tempSelections)

drop table #tempSelections