Update ShipWorkDone_3 a
 Set (LoadSum,PlanLoadSum,TimeSum,TotalTimeSum,TotalWeightTime,TotalDayTimeSum,TotalCraneNum)=
 (
 Select  Sum(DayLoad) as LoadSum,
 case when (PlanWorkCount-Case When SUM(DayLoad) Is Null Then 0 Else SUM(DayLoad) End )< 0 then 0 else (PlanWorkCount-Case When SUM(DayLoad) Is Null Then 0 Else SUM(DayLoad) End ) end  as PlanLoadSum,
 sum(DayWorkTime) as TimeSum, sum(WorkTime) as TotalTimeSum,sum(DayWeightTime) as TotalWeightTime,
 SUM(DayTime) as TotalDayTimeSum,SUM(DayCraneNum) as TotalCraneNum
 From WorkDayInfo_3 b,ShipWorkDone_3 c
 Where b.ApplyID=c.ApplyID And b.BerthShiftTimes=c.BerthShiftTimes
 And   b.ApplyID=a.ApplyID And b.BerthShiftTimes=a.BerthShiftTimes
 And   b.ApplyID=A_ApplyID And b.BerthShiftTimes=B_BerthShiftTimes
 Group By b.ApplyID,b.BerthShiftTimes,c.ApplyID,c.BerthShiftTimes
)
Where  a.ApplyID=A_ApplyID And a.BerthShiftTimes=B_BerthShiftTimes;请教该如何改,才能正确