原表格:V_ChannelReward结构为:
select * from V_ChannelReward pivot (max(RewardSum) for RewardItem in ([星级奖励],[自建空充酬金],[首充酬金],[BOSS待办酬金],[激活酬金],[神州行上网套餐拓展酬金],[其他],[新增客户与裸机捆绑销售],[实名登记酬金],[宽带业务酬金],[2G渠道体系酬金],[3G渠道体系酬金],[数据业务酬金],[开户激励酬金],[开户基础酬金],[在网酬金],[维系酬金],[双网酬金],[拓展质量酬金],[统一管理酬金],[裸机达量酬金])) as pvt where pvt.ChannelNo='1003'
行转列得到的新表格: