update period set 
  period.DI002454 = subselect.summarized -- sum avail. cap
from DT468 period, (select ISNULL(sum(period_self.DI001337), 0) +
						   ISNULL(sum(period_self.DI002454), 0) as summarized,
						   DI001327 as period_day
    from dt468 period_self
    where 
      period_self.DI001326 = '{parent_res_id}'
      and period_self.DI001327 BETWEEN convert(datetime, '{start_period}', 104) AND convert(datetime, '{end_period}', 104)
    group by period_self.DI001327) subselect
where
  period.di001364 = 1
  and period.DI001327 BETWEEN convert(datetime, '{start_period}', 104) AND convert(datetime, '{end_period}', 104)
  and period.DI001326 = '{parent_res_id}'
  and subselect.period_day = period.DI001327