update period set 
  period.DI002454 = subselect.summarized, -- sum avail. cap
  period.DI002545 = subselect.summarized_f1, -- sum factor 1
  period.DI002546 = subselect.summarized_f2, -- sum factor 2
  period.DI002640 = subselect.summarized_bl, -- sum base load
  period.DI002641 = subselect.summarized_f4, -- sum factor 4
  period.DI002642 = subselect.summarized_f5  
  
from DT468 period, (select ISNULL(sum(period_self.DI001337), 0) +
						   ISNULL(sum(period_self.DI002454), 0) as summarized,
                           ISNULL(sum(period_self.DI002373), 0) +
						   ISNULL(sum(period_self.DI002545), 0) as summarized_f1,
                           ISNULL(sum(period_self.DI002374), 0) +
						   ISNULL(sum(period_self.DI002546), 0) as summarized_f2,
                           ISNULL(sum(period_self.DI002375), 0) +
						   ISNULL(sum(period_self.DI002640), 0) as summarized_bl,
                           ISNULL(sum(period_self.DI002371), 0) +
						   ISNULL(sum(period_self.DI002641), 0) as summarized_f4,
                           ISNULL(sum(period_self.DI002372), 0) +
						   ISNULL(sum(period_self.DI002642), 0) as summarized_f5,
						   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