求助Update语句
现在有四列数据,要求采用一条UPDATE语句根据条件A分组来更新第四列的汇总字段      
 条件A         条件B                           条件B权数                                             条件A权数汇总 
 1   4   0.10   0    
 2   4   0.48   0    
 2   23   0.15   0    
 1   36   0.17   0           
 因此,汇总之后条件A中等于1的字段中汇总数均为0.27,   等于2的汇总数为0.63,不知道有没有一句SQL语句能够搞定,谢谢!
------解决方案--------------------udpate 表 set 条件A权数汇总= (select sum(条件B权数) from 表 a where 表.条件A = a.条件A)
------解决方案--------------------declare @ta table(col1 int,col2 int, col3 numeric(15,2),col4 numeric(15,2)) 
 insert @ta select 1, 4, 0.10, 0  
 union all select 2, 4, 0.48, 0  
 union all select 2, 23, 0.15, 0  
 union all select 1, 36, 0.17, 0    
 update a 
 set col4=(select sum(col3) from @ta where col1=a.col1) 
  from @ta a   
 select * from @ta   
 (所影响的行数为 4 行)     
 (所影响的行数为 4 行)   
 col1        col2        col3              col4               
 ----------- ----------- ----------------- -----------------  
 1           4           .10               .27 
 2           4           .48               .63 
 2           23          .15               .63 
 1           36          .17               .27   
 (所影响的行数为 4 行)   
------解决方案--------------------Table1: 
 ConditionA           NumA               TotalA 
    1                 1        0 
     2 48        0 
     2 15        0 
     1 17        0   
 Update语句为:   
 update Table1 
 set TotalA=( 
 case ConditionA 
   When  '1 ' then (select sum(NumA) from table1 where ConditionA = '1 ') 
   when  '2 ' then (select sum(NumA) from table1 where ConditionA = '2 ') 
 end 
 )