求一条SQL!!!!!!!!!!!!!!!!!!!
我现在有一维表如下 
 xh                                    kc               cj 
 051000333   高等数学         55 
 051000333   大学语文         67 
 051000333   经济学基础   88 
 021000224   高等数学         64 
 021000224   大学语文         32 
 021000224   经济学基础   75 
 041000851   高等数学         69 
 041000851   大学语文         75 
 041000851   经济学基础   65   
 要转换成下面的表   
 xh                                          高等数学         大学语文      经济学基础 
 051000333                        55                                 67                           88 
 021000224                        64                                 32                           75 
 041000851                        69                                 75                           65     
 请问一条SQL能搞定吗? 
------解决方案--------------------create table t(xh varchar(20),kc varchar(20),cj int) 
 insert t select  '051000333 ', '高等数学 ',55 
 union all select  '051000333 ', '大学语文 ',67 
 union all select  '051000333 ', '经济学基础 ',88 
 union all select  '021000224 ', '高等数学 ',64 
 union all select  '021000224 ', '大学语文 ',32 
 union all select  '021000224 ', '经济学基础 ',75 
 union all select  '041000851 ', '高等数学 ',69 
 union all select  '041000851 ', '大学语文 ',75 
 union all select  '041000851 ', '经济学基础 ',65     
 declare @sql varchar(8000) 
 set @sql =  'select xh ' 
 select @sql = @sql +  ' , sum(case kc when  ' ' ' + kc +  ' ' ' then cj else 0 end) [ ' + kc +  '] ' 
 from (select distinct kc from t) as a 
 set @sql = @sql +  ' from t group by xh ' 
 exec(@sql)    
 drop table t   
 xh                   大学语文        高等数学        经济学基础        
 -------------------- ----------- ----------- -----------  
 021000224            32          64          75 
 041000851            75          69          65 
 051000333            67          55          88
------解决方案--------------------select xh, 
 	sum(case when kc= '高等数学 ' then cj else 0 end) as  '高等数学 ', 
 	sum(case when kc= '大学语文 ' then cj else 0 end) as  '大学语文 ', 
 	sum(case when kc= '经济学基础 ' then cj else 0 end) as  '经济学基础 ' 
 from 表 
 group by xh
------解决方案--------------------select xh,高等数学=sum(case kc when  '高等数学 ' then cj else 0 end), 
 大学语文=sum(case kc when  '大学语文 ' then cj else 0 end), 
 经济学基础=sum(case kc when  '经济学基础 ' then cj else 0 end) 
 from t group by xh
------解决方案--------------------  CREATE TABLE #T(xh nvarchar(20),kc nvarchar(40),cj int) 
 INSERT INTO #T 
 SELECT  '051000333 ', '高等数学 ',   55 UNION ALL 
 SELECT  '051000333 ', '大学语文 ',   67 U