update a
set A.jfje=case when(B.jfje!=0) then B.jfje else A.jfje end,
A.dfje=case when(B.dfje<>0) then B.dfje else A.dfje end,
A.ljjf=case when(B.ljjf<>0) then B.ljjf else A.ljjf end,
A.ljdf=case when(B.ljdf<>0) then B.ljdf else A.ljdf end
from #Tzzb AS A
inner join #TTzzb AS B on B.month=A.month and B.kmdm=A.kmdm)
set A.jfje=case when(B.jfje!=0) then B.jfje else A.jfje end,
A.dfje=case when(B.dfje<>0) then B.dfje else A.dfje end,
A.ljjf=case when(B.ljjf<>0) then B.ljjf else A.ljjf end,
A.ljdf=case when(B.ljdf<>0) then B.ljdf else A.ljdf end
from #Tzzb AS A
inner join #TTzzb AS B on B.month=A.month and B.kmdm=A.kmdm)
set A.jfje=case when(B.jfje!=0) then B.jfje else A.jfje end,
A.dfje=case when(B.dfje<>0) then B.dfje else A.dfje end,
A.ljjf=case when(B.ljjf<>0) then B.ljjf else A.ljjf end,
A.ljdf=case when(B.ljdf<>0) then B.ljdf else A.ljdf end
from #Tzzb AS A
inner join #TTzzb AS B on B.month=A.month and B.kmdm=A.kmdm
update 后面直接跟子查询不行.在表达式里跟子查询可以.况且你的子查询后也没跟别名.